{ "info": { "author": "Matej Ramuta", "author_email": "matej.ramuta@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# SmartNinja Redis\n\nA wrapper that simulates Redis on localhost (using TinyDB) and uses a real Redis db in production.\n\n**Important:** This package is meant to be used at SmartNinja courses for learning purposes. It is not advised to use this package for serious projects. Use the default `redis` package instead. You only need to change the import statement.\n\n## Installation\n\nInstall via pip:\n\n```bash\npip install smartninja-redis\n```\n\n## Dependencies\n\nThe package has two dependencies: `tinydb` and `redis`. It installs them automatically.\n\n## Usage\n\nAccess Redis via the `from_url()` function:\n\n```python\nimport smartninja_redis as redis\n\nr_url = redis.from_url(url=\"localhost\")\nr_url.set(name=\"Ninja\", value=\"Smart\")\n\nprint(r_url.get(\"Ninja\"))\n```\n\nor via Redis class directly:\n\n```python\nfrom smartninja_redis import Redis\n\nr_class = Redis(host=\"localhost\")\nr_class.set(name=\"smart\", value=\"ninja\")\n\nprint(r_class.get(\"smart\"))\n```\n\nFor now, only `set()` and `get()` methods work on localhost.\n\n> The following set() parameters do not work: ex, px, nx, xx\n\n### TinyDB\n\nTinyDB is used to simulate Redis on localhost (if you don't have Redis installed and `REDIS_URL` env var set). TinyDB does not store any data on disk (in this case). It uses memory storage only.\n\n### Using a real Redis service\n\nIf you'd like to use SmartNinja with a real Redis service (instead of TinyDB), make sure you have `REDIS_URL` environment variable set.\n\n## Contributions\n\nContributions via pull requests are warmly welcome!\n\n## TODO\n\n- tests\n- CI", "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/smartninja/smartninja-redis", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "smartninja-redis", "package_url": "https://pypi.org/project/smartninja-redis/", "platform": "", "project_url": "https://pypi.org/project/smartninja-redis/", "project_urls": { "Homepage": "https://github.com/smartninja/smartninja-redis" }, "release_url": "https://pypi.org/project/smartninja-redis/0.3/", "requires_dist": null, "requires_python": "", "summary": "SmartNinja Redis - a wrapper that simulates Redis on localhost and uses real Redis in production.", "version": "0.3" }, "last_serial": 4847638, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "95bb1b020c6ed8ed69d1fc0d858e6706", "sha256": "8aa5244fc4a390c439cb7f1ef5ae931666614e04df9afb39bf6beaaab0439981" }, "downloads": -1, "filename": "smartninja-redis-0.1.tar.gz", "has_sig": false, "md5_digest": "95bb1b020c6ed8ed69d1fc0d858e6706", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2478, "upload_time": "2019-02-20T20:21:59", "url": "https://files.pythonhosted.org/packages/71/34/653c7a4e2325fa8dd0593375dd6e95573c083fab2c83186bcea28b73cfcf/smartninja-redis-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "28e60838463060b57c62598013696b9b", "sha256": "6dc7d8ca1a29f374268cef279d0d7519d19051980349920de015e9f86aafa053" }, "downloads": -1, "filename": "smartninja-redis-0.2.tar.gz", "has_sig": false, "md5_digest": "28e60838463060b57c62598013696b9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2484, "upload_time": "2019-02-20T21:31:20", "url": "https://files.pythonhosted.org/packages/ae/9b/cea51bdda4dd361ded62f76d18f79f9a1bdd254f962186612a1794f1c21a/smartninja-redis-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "846a97c9b47b6fd24264971941cdb01f", "sha256": "236123f0bc3991491a5c08e4ec233f1164f5271860a56c1d047cf2b16ad31e2e" }, "downloads": -1, "filename": "smartninja-redis-0.3.tar.gz", "has_sig": false, "md5_digest": "846a97c9b47b6fd24264971941cdb01f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2492, "upload_time": "2019-02-20T22:30:19", "url": "https://files.pythonhosted.org/packages/42/3d/be46a45d885ab6c1b3e63d40970b02d7fdc6d5f1d6ea631b93899b5cd5bc/smartninja-redis-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "846a97c9b47b6fd24264971941cdb01f", "sha256": "236123f0bc3991491a5c08e4ec233f1164f5271860a56c1d047cf2b16ad31e2e" }, "downloads": -1, "filename": "smartninja-redis-0.3.tar.gz", "has_sig": false, "md5_digest": "846a97c9b47b6fd24264971941cdb01f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2492, "upload_time": "2019-02-20T22:30:19", "url": "https://files.pythonhosted.org/packages/42/3d/be46a45d885ab6c1b3e63d40970b02d7fdc6d5f1d6ea631b93899b5cd5bc/smartninja-redis-0.3.tar.gz" } ] }