{ "info": { "author": "Niels van Huijstee", "author_email": "niels@fuga.cloud", "bugtrack_url": null, "classifiers": [], "description": "# Redis Shelve\n[![Build status](https://img.shields.io/travis/FugaCloud/redis-shelve.svg)](https://travis-ci.org/FugaCloud/redis-shelve) \nA Python shelve that uses Redis as storage. \n\n## Motivation\nIn some contexts writing state to files can be hard. Redis can be a more\nsuitable storage solution. If you need a shelve but cannot write to file and \nif you are friends with Redis already, you can use Redis Shelve.\n\n## License\nRedis Shelve is licensed under LGPLv3. See the LICENSE file for details.\n\n## Installation\n`pip install redis-shelve`\n\n## Usage\nThe behaviour of the Redis shelve should be similar to Python shelve. Instead\nof a filename, you can pass redis-shelve a redis instance. You can think of the\nconfigured redis database being similiar to a file in Python shelve.\n\n```python\nimport redisshelve\nfrom redis import Redis\n\nredis = Redis(db=15)\nshelf = redisshelve.RedisShelf(redis=redis)\n\nshelf['test'] = 'Test'\nassert 'Test' == shelf['test']\nassert 'Test' == shelf.get('test')\n```\n\nYou can also use the `redisshelve.open` context manager.\n\n```python\nwith redisshelve.open(redis=redis) as shelf:\n shelf['foo'] = 'Bar'\n```\n\n## Prefixing keys\nBy default, the keys you enter in the shelf are used as keys in Redis. If you\nthink this might conflict with existing values, you can prefix your keys. \n\n**NB:** As a side effect, if you also use writeback, the keys in the shelf's cache\nare also prefixed.\n\n```python\nshelf = redisshelve.RedisShelf(redis=redis, key_prefix='my_prefix')\n\nwith redisshelve.open(redis=redis, key_prefix='my_prefix') as shelf:\n shelf['foo'] = 'Bar'\n```\n\n## More examples.\n\nPlease see the tests for more examples. \n\nunprefixed: `tests/test_redisshelve_unprefixed.py` \nprefixed: `tests/test_redisshelve_prefixed.py`\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/FugaCloud/redis-shelve", "keywords": "", "license": "GNU Lesser General Public License v3 (LGPLv3)", "maintainer": "", "maintainer_email": "", "name": "redis-shelve", "package_url": "https://pypi.org/project/redis-shelve/", "platform": "", "project_url": "https://pypi.org/project/redis-shelve/", "project_urls": { "Homepage": "https://github.com/FugaCloud/redis-shelve" }, "release_url": "https://pypi.org/project/redis-shelve/1.0.3/", "requires_dist": [ "redis" ], "requires_python": "", "summary": "", "version": "1.0.3" }, "last_serial": 5827396, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "266edcfe67451fe0f1089fec043644b2", "sha256": "c22937d00947592d2346f764004643b73335037b8ed934410d4a7df95f491dda" }, "downloads": -1, "filename": "redis_shelve-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "266edcfe67451fe0f1089fec043644b2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5086, "upload_time": "2019-04-04T15:26:01", "url": "https://files.pythonhosted.org/packages/71/97/ac1520202f947d61a8a88808894414edcd75eb5e8200287dd7f1285de464/redis_shelve-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4f70d50d439195a147dee3aad5731809", "sha256": "5cba5d81cc2a2328e79b458493772a803ff8b0768c5130729c91a7d95382ac01" }, "downloads": -1, "filename": "redis-shelve-1.0.1.tar.gz", "has_sig": false, "md5_digest": "4f70d50d439195a147dee3aad5731809", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6962, "upload_time": "2019-04-04T15:26:03", "url": "https://files.pythonhosted.org/packages/68/2b/10d2d5cd59efd743f80113db6c893b87dc70b2d276e6132b8e5b7ce0f376/redis-shelve-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "2142c6ab429bd8610b998c045a815d8d", "sha256": "df1f3d06383365c29f8a57c5d9b520118a65d62a947eb9c448f535f60df961b6" }, "downloads": -1, "filename": "redis_shelve-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "2142c6ab429bd8610b998c045a815d8d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5341, "upload_time": "2019-08-27T13:40:45", "url": "https://files.pythonhosted.org/packages/d9/85/edd4eac86cde7a8d0f3d5c34a16bac70f8f33356929f05c79d533ac639a3/redis_shelve-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c1be6f121279ed942db05c7e36e2e780", "sha256": "927eeb74ba0663c3b5515f4e514cf3c63ec7e1c4f60ce5aa279b5c6d183bab51" }, "downloads": -1, "filename": "redis-shelve-1.0.2.tar.gz", "has_sig": false, "md5_digest": "c1be6f121279ed942db05c7e36e2e780", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2875, "upload_time": "2019-08-27T13:40:46", "url": "https://files.pythonhosted.org/packages/aa/29/6f1246f29841c731def5c8dd2c104dc0ec8218f6311017a7cc0909980f5d/redis-shelve-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "f5a2ebbf3742878d57d4540f4b2d7dcb", "sha256": "1fc8924e610c97f9d2508a66b7ae0e17d608246a06094a1a01029574b5689c54" }, "downloads": -1, "filename": "redis_shelve-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "f5a2ebbf3742878d57d4540f4b2d7dcb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5930, "upload_time": "2019-09-13T19:12:44", "url": "https://files.pythonhosted.org/packages/5f/68/495f0efe97037a54109ade4fe84f80cdf8c73a7ad0aee6f12d53bf70983f/redis_shelve-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95e593053a2aa6d6ef115f5c94bfcc05", "sha256": "aa9a4b180d8a5e2f65278e29b9801100e30c60ab6c5b59d4afa04df0d9d70874" }, "downloads": -1, "filename": "redis-shelve-1.0.3.tar.gz", "has_sig": false, "md5_digest": "95e593053a2aa6d6ef115f5c94bfcc05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3256, "upload_time": "2019-09-13T19:12:46", "url": "https://files.pythonhosted.org/packages/a4/61/2587e6f649f08f8749abe0aeb9aea3fa969247f9fb97124a13c00d5281cf/redis-shelve-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f5a2ebbf3742878d57d4540f4b2d7dcb", "sha256": "1fc8924e610c97f9d2508a66b7ae0e17d608246a06094a1a01029574b5689c54" }, "downloads": -1, "filename": "redis_shelve-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "f5a2ebbf3742878d57d4540f4b2d7dcb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5930, "upload_time": "2019-09-13T19:12:44", "url": "https://files.pythonhosted.org/packages/5f/68/495f0efe97037a54109ade4fe84f80cdf8c73a7ad0aee6f12d53bf70983f/redis_shelve-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95e593053a2aa6d6ef115f5c94bfcc05", "sha256": "aa9a4b180d8a5e2f65278e29b9801100e30c60ab6c5b59d4afa04df0d9d70874" }, "downloads": -1, "filename": "redis-shelve-1.0.3.tar.gz", "has_sig": false, "md5_digest": "95e593053a2aa6d6ef115f5c94bfcc05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3256, "upload_time": "2019-09-13T19:12:46", "url": "https://files.pythonhosted.org/packages/a4/61/2587e6f649f08f8749abe0aeb9aea3fa969247f9fb97124a13c00d5281cf/redis-shelve-1.0.3.tar.gz" } ] }