{ "info": { "author": "Trong-Nghia Nguyen", "author_email": "nghia@viisix.space", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Flask", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Database", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Flask-Redislite\n===============\n\n.. image:: https://travis-ci.org/ViiSiX/FlaskRedislite.svg?branch=master\n :target: https://travis-ci.org/ViiSiX/FlaskRedislite\n.. image:: https://landscape.io/github/ViiSiX/FlaskRedislite/master/landscape.svg?style=flat\n :target: https://landscape.io/github/ViiSiX/FlaskRedislite/master\n :alt: Code Health\n\nUsing Flask with *Redislite*, also *redis-collections* and *rq*.\n\nInstallation\n------------\nUsing pip\n\n.. code-block:: bash\n\n pip install Flask-Redislite\n\nUsage\n-----\nChoose the path for your Redislite data file, then include to your application config\n\n.. code-block:: python\n\n REDISLITE_PATH = ''\n \nCreate new redis instance within your application\n\n.. code-block:: python\n\n from flask import Flask\n from flask_redislite import FlaskRedis\n \n app = Flask(__name__)\n \n rdb = FlaskRedis(app)\n # with redis-collections:\n # rdb = FlaskRedis(app, collection = True)\n \nThen use it on your view\n\n.. code-block:: python\n\n rdb.connection.set('foo1', 'bar1')\n print rdb.connection.get('foo1')\n \n # redis-collections\n collection = rdb.collection\n d = collection.dict('123456')\n d['foo'] = 'bar'\n print d\n\nRQ\n-----\nTo use Flask-Redislite with RQ, you need to start RQ worker as a new process\n\n.. code-block:: python\n\n from flask import Flask\n from flask_redislite import FlaskRedis\n\n app = Flask(__name__)\n\n rdb = FlaskRedis(app, rq=True)\n\n # Your other extensions load here\n # ex: lm = LoginManager()\n # ...\n\n with app.app_context():\n rdb.start_worker()\n\n # your codes\n # ex: views function\n\n app.run()\n\nThen within your view enqueue the jobs:\n\n.. code-block:: python\n\n import time\n\n def simple_job():\n time.sleep(2)\n return 12345\n\n queue = rdb.queue\n queue['default'].enqueue(simple_job, ttl=60, result_ttl=60, job_id='321')\n sleep(5)\n print queue['default'].fetch_job('321').result\n\n\nHistory\n=======\n\n0.1.1 (07/11/2017)\n------------------\n- Update README.rst\n- Upgrade library\n\n0.1.0 (31/8/2016)\n-----------------\n- Support multiple queue\n\n0.0.5 (9/7/2016)\n----------------\n- Better test coverage\n- Apply PEP8\n- Resume lost Redislite process on restart, interrupted exit\n\n0.0.4 (6/7/2016)\n----------------\n- Add test\n\n0.0.3 (5/7/2016)\n----------------\n- Implement RQ\n\n0.0.2 (3/7/2016)\n----------------\n- Add documents\n- Fix minor codes\n\n0.0.1 (2/7/2016)\n----------------\n\n- Initial package\n- Allow to use Redislite and redis-collections from Flask", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/ViiSiX/FlaskRedislite", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ViiSiX/FlaskRedislite", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "Flask-Redislite", "package_url": "https://pypi.org/project/Flask-Redislite/", "platform": "any", "project_url": "https://pypi.org/project/Flask-Redislite/", "project_urls": { "Download": "https://github.com/ViiSiX/FlaskRedislite", "Homepage": "https://github.com/ViiSiX/FlaskRedislite" }, "release_url": "https://pypi.org/project/Flask-Redislite/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Using Flask with Redislite", "version": "0.1.1" }, "last_serial": 3312583, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "be934c9fe47e8ae36f4045c2c5c3b8a6", "sha256": "1d2f6532b41788b1c5d818aa4b37ea66630f514f03de0781e5a170862dff22f4" }, "downloads": -1, "filename": "Flask-Redislite-0.1.1.tar.gz", "has_sig": false, "md5_digest": "be934c9fe47e8ae36f4045c2c5c3b8a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5033, "upload_time": "2017-11-07T12:34:01", "url": "https://files.pythonhosted.org/packages/7e/d0/68ff665271856a0a190b33c250160b514c155332270bd54a1cc8867d78ab/Flask-Redislite-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "be934c9fe47e8ae36f4045c2c5c3b8a6", "sha256": "1d2f6532b41788b1c5d818aa4b37ea66630f514f03de0781e5a170862dff22f4" }, "downloads": -1, "filename": "Flask-Redislite-0.1.1.tar.gz", "has_sig": false, "md5_digest": "be934c9fe47e8ae36f4045c2c5c3b8a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5033, "upload_time": "2017-11-07T12:34:01", "url": "https://files.pythonhosted.org/packages/7e/d0/68ff665271856a0a190b33c250160b514c155332270bd54a1cc8867d78ab/Flask-Redislite-0.1.1.tar.gz" } ] }