{ "info": { "author": "\u00c1lvaro Justen", "author_email": "alvarojusten@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "mongodict - MongoDB-backed Python dict-like interface\n=====================================================\n\nSo you are storing some key-values in a ``dict`` but your data became huge than\nyour memory or you want to persist it on the disk? Then `mongodict\n`_ is for\nyou!\n\nAs it uses `MongoDB `_ to store the data, you get all cool\n`MongoDB `_ things, like shardings and replicas. It uses\nthe `pickle` module available on Python standard library to\nserialize/deserialize data and store everything as `bson.Binary` in MongoDB.\nYou can also provide another codec (serializer/deserializer).\n\n`mongodict `_ is tested under\n`Python 2.7.5 `_ and\n`Python 3.3.2 `_.\n\n\nInstallation\n------------\n\nAs simple as::\n\n pip install mongodict\n\n\nUsage\n-----\n\nAs it uses\n`collections.MutableMapping `_\nas its base, you just need to change the line which creates your ``dict``.\nFor instace, just replace::\n\n >>> my_dict = {}\n\nwith::\n\n >>> from mongodict import MongoDict\n >>> my_dict = MongoDict(host='localhost', port=27017, database='my_dict',\n collection='store')\n\nand then use it like a normal ``dict``::\n\n >>> my_dict['python'] = 'rules'\n >>> print my_dict['python']\n rules\n >>> del my_dict['python']\n >>> print my_dict['python']\n Traceback (most recent call last):\n File \"\", line 1, in \n File \"mongodict.py\", line 82, in __getitem__\n raise KeyError(key)\n KeyError: u'python'\n >>> my_dict['spam'] = 'eggs'\n >>> my_dict['ham'] = 'damn'\n >>> for key, value in my_dict.items():\n ... print '{} = {}'.format(key, value)\n ...\n spam = eggs\n ham = damn\n\nIf you want to use another codec, you should pass serialize and deserialize\nfunctions to the class during the initialization. For example, to use JSON::\n\n >>> import json\n >>> json_dict = MongoDict(host='localhost', port=27017,\n database='json_dict', collection='store',\n codec=(json.dumps, json.loads))\n >>> # use json_dict as usual\n\nEnjoy! :-)\n\n.. NOTE::\n There is no kind of in-memory cache, so all key lookups will be translated\n in a `MongoDB `_ query but as\n `MongoDB `_'s server put everything it can in memory,\n probably it'll not be a problem (if your working set is always entire in\n memory).\n\n\nAuthentication\n--------------\n\nIf you want to use MongoDB's authentication to the database ``MongoDict`` is\nconnecting to, you just need to provide an ``auth`` parameter, as in this\nexample::\n\n\n from mongodict import MongoDict\n\n\n my_dict = MongoDict(host='localhost', port=27017, database='mydb',\n collection='mongodict',\n auth=('my username', 'my password'))\n\n\n\nWhy not Redis?\n--------------\n\n`Redis `_ is \"remote directory server\" - it's a great piece\nof software and can do the job if all your data fit on memory. By other side,\n`MongoDB `_ already have mature sharding and replica set\nfeatures. So, if you need to store lots of key-value pairs that don't fit on\nmemory, `mongodict `_ can solve your\nproblem.\n\n.. NOTE::\n `mongodict `_ does not have the same\n API other key-value software have\n (like `memcached `_). Some features are missing to\n compete directly with these kind of software (by now we have only the\n ``dict``-like behaviour), but I have plans to add it soon.\n\n\nContributing\n------------\n\n- This software uses `Semantic Versioning `_.\n- This software uses\n `Test-Driven Development `_.\n\nYou can run the tests either with or without\n`tox `_.\n\nWithout tox\n~~~~~~~~~~~\n\nThis is the simplest approach: you'll test only for one Python version. To do\nit, just execute::\n\n mkvirtualenv --no-site-packages mongodict-without-tox\n pip install -r requirements/develop.txt\n make test\n\n\nWith tox\n~~~~~~~~\n\nWith `tox `_ you can test for\nmore than one Python version (currently for 2.7 and 3.2). You just need to\ncreate a virtualenv, install and run it::\n\n mkvirtualenv --no-site-packages tox-for-mongodict\n pip install tox\n tox\n\n`tox `_ will create one\nvirtualenv for each Python version, install requirements and then run the tests\nfor each of them. Note that you need the python binaries available in your\nsystem (2.7 and 3.2) to run the tests.\n\n\nAuthor\n------\n\nThis software was written and is maintained by\n`\u00c1lvaro Justen (aka Turicas) `_.\nPlease contact me at ``alvarojusten`` *at* ``gmail`` *dot* ``com``.\n\n\nLicense\n-------\n\nIt's licensed under `GPL version 3 `_.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/turicas/mongodict/", "keywords": "key-value,database,mongodb,dictionary", "license": "GPL3", "maintainer": null, "maintainer_email": null, "name": "mongodict", "package_url": "https://pypi.org/project/mongodict/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mongodict/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/turicas/mongodict/" }, "release_url": "https://pypi.org/project/mongodict/0.3.1/", "requires_dist": null, "requires_python": null, "summary": "MongoDB-backed Python dict-like interface", "version": "0.3.1" }, "last_serial": 1001732, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7822cfe0339737a0552449782c811e4c", "sha256": "1d53574b95baa69fe05fb2cc6cdbc931a039ea275cf7d0faa509e0eeb876bf7e" }, "downloads": -1, "filename": "mongodict-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7822cfe0339737a0552449782c811e4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14657, "upload_time": "2012-07-18T11:52:42", "url": "https://files.pythonhosted.org/packages/5c/c2/cf37dd827b8941daa978605003439f78be22cc7d3ef89da37742e453fa37/mongodict-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "2a57e38b758ab5dcbb4b19b56901cfd5", "sha256": "b7742773b9bd76227756294f97ecccee6399c14bd90330e22f90a99f9da44d04" }, "downloads": -1, "filename": "mongodict-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2a57e38b758ab5dcbb4b19b56901cfd5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15054, "upload_time": "2012-07-18T16:07:03", "url": "https://files.pythonhosted.org/packages/8e/2d/da52a1956d5acfcab331db416d1a21c5dbb1576a97436ca0d28e4a1c5317/mongodict-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "71b29c6cf74dfaa77b053b3662fe5bcb", "sha256": "fbb283def8fe11696dac0815221420919226e49c4043812252c78f8c25b97087" }, "downloads": -1, "filename": "mongodict-0.2.0.tar.gz", "has_sig": false, "md5_digest": "71b29c6cf74dfaa77b053b3662fe5bcb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15419, "upload_time": "2012-08-06T11:22:53", "url": "https://files.pythonhosted.org/packages/b7/cf/5549d722536f005e645dfb4e5154d59978ac8904f56058c46830572fa111/mongodict-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "d11b78ac3c5e8f7723dc305ec7fcd69e", "sha256": "b215113a44b5957cf461c860bd113255c3cef6b422eb39c4a59b29562aef7a70" }, "downloads": -1, "filename": "mongodict-0.2.1.tar.gz", "has_sig": false, "md5_digest": "d11b78ac3c5e8f7723dc305ec7fcd69e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15592, "upload_time": "2012-12-18T23:52:17", "url": "https://files.pythonhosted.org/packages/6c/8a/b1bd5b90a6234441ab8f1b3fe6152a5b37a2610a4a9d29ae2bc19536b8ca/mongodict-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "58a83d9136a5f06b80a63011913304c4", "sha256": "ff5867db78c9f79bd4f95e04ae6943bb93b7d194e45220697207e0e7378d419e" }, "downloads": -1, "filename": "mongodict-0.3.0.tar.gz", "has_sig": false, "md5_digest": "58a83d9136a5f06b80a63011913304c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16079, "upload_time": "2013-05-22T14:05:34", "url": "https://files.pythonhosted.org/packages/fa/2c/1a7ccc194f2ffc49dc8b2e9087db3e2abd034c77f6fe10e652bbe8df4d86/mongodict-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "57f8bb308156c1891d790bb107eb4f9d", "sha256": "9c66d65fd1cd3e1e03fed9d5c11c6e3603a10b2a60c9dbd703f58ca15d55655b" }, "downloads": -1, "filename": "mongodict-0.3.1.tar.gz", "has_sig": false, "md5_digest": "57f8bb308156c1891d790bb107eb4f9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18313, "upload_time": "2014-02-17T03:53:29", "url": "https://files.pythonhosted.org/packages/aa/27/64b9b903ed125a4c26dd9fc28921e90bfd3eca0bdce91ce8faac502e61e7/mongodict-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "57f8bb308156c1891d790bb107eb4f9d", "sha256": "9c66d65fd1cd3e1e03fed9d5c11c6e3603a10b2a60c9dbd703f58ca15d55655b" }, "downloads": -1, "filename": "mongodict-0.3.1.tar.gz", "has_sig": false, "md5_digest": "57f8bb308156c1891d790bb107eb4f9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18313, "upload_time": "2014-02-17T03:53:29", "url": "https://files.pythonhosted.org/packages/aa/27/64b9b903ed125a4c26dd9fc28921e90bfd3eca0bdce91ce8faac502e61e7/mongodict-0.3.1.tar.gz" } ] }