mongodict

MongoDB-backed Python dict-like interface
Download

mongodict Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL v3
  • Price:
  • FREE
  • Publisher Name:
  • Alvaro Justen
  • Publisher web site:
  • https://github.com/turicas/

mongodict Tags


mongodict Description

So you are storing some key-values in a dict but your data became huge than your memory or you want to persist it on the disk? Then mongodict is the perfect module for you!As it uses MongoDB to store the data, you get all cool MongoDB things, like shardings and replicas.InstallationAs simple as:pip install mongodictor:easy_install mongodictUsageAs it uses collections.MutableMapping as its base, you just need to change the line which creates your dict. For instace, just replace:>>> my_dict = {}with:>>> from mongodict import MongoDict>>> my_dict = MongoDict(host='localhost', port=27017, database='my_dict', collection='store')and then use it like a normal dict:>>> my_dict = 'rules'>>> print my_dict'rules'>>> del my_dict>>> print my_dictTraceback (most recent call last): File "< stdin >", line 1, in < module > File "mongodict.py", line 23, in __getitem__ raise KeyErrorKeyErrorProduct's homepage


mongodict Related Software