{ "info": { "author": "Martin Sucha", "author_email": "martin.sucha@exponea.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Flask-Redis-Sentinel\n====================\n\n.. image:: https://travis-ci.org/exponea/flask-redis-sentinel.svg\n :target: https://travis-ci.org/exponea/flask-redis-sentinel\n :alt: Travis CI\n\nFlask-Redis-Sentinel provides support for connecting to Redis using Sentinel and also supports connecting to Redis\nwithout it.\n\n* Supports Python 2.7 and 3.3+\n* Licensed using Apache License 2.0\n\nInstallation\n------------\n\nInstall with pip::\n\n pip install Flask-Redis-Sentinel\n\nBasic usage\n-----------\n\n.. code-block:: python\n\n from flask_redis_sentinel import SentinelExtension\n\n redis_sentinel = SentinelExtension()\n redis_connection = redis_sentinel.default_connection\n\n # Later when you create application\n app = Flask(...)\n redis_sentinel.init_app(app)\n\nYou can configure Redis connection parameters using `REDIS_URL` Flask configuration variable with `redis+sentinel`\nURL scheme::\n\n redis+sentinel://localhost:26379[,otherhost:26379,...]/mymaster/0\n redis+sentinel://localhost:26379[,otherhost:26379,...]/mymaster/0?socket_timeout=0.1\n redis+sentinel://localhost:26379[,otherhost:26379,...]/mymaster/0?sentinel_socket_timeout=0.1\n redis+sentinel://:sentinel-secret-password@localhost:26379[,otherhost:26379,...]/mymaster/0?sentinel_socket_timeout=0.1\n\nThe extension also supports URL schemes as supported by redis-py for connecting to an instance directly without Sentinel::\n\n redis://[:password]@localhost:6379/0\n rediss://[:password]@localhost:6379/0\n unix://[:password]@/path/to/socket.sock?db=0\n\nFlask-And-Redis style config variables are also supported for easier migration, but the extension will\nlog a `DeprecationWarning`::\n\n REDIS_HOST = 'localhost'\n REDIS_PORT = 6379\n REDIS_DB = 0\n\nIn case both `REDIS_URL` and other variables are present, the URL is used.\n\nCreating multiple connection pools using a single Sentinel cluster\n------------------------------------------------------------------\n\n.. code-block:: python\n\n from flask_redis_sentinel import SentinelExtension\n\n redis_sentinel = SentinelExtension()\n master1 = redis_sentinel.master_for('service1')\n master2 = redis_sentinel.master_for('service2')\n slave1 = redis_sentinel.slave_for('service1')\n\nAccessing redis-py's Sentinel instance\n--------------------------------------\n\n.. code-block:: python\n\n from flask_redis_sentinel import SentinelExtension\n from flask import jsonify, Flask\n\n app = Flask('test')\n\n redis_sentinel = SentinelExtension(app=app)\n\n @app.route('/')\n def index():\n slaves = redis_sentinel.sentinel.discover_slaves('service1')\n return jsonify(slaves=slaves)\n\nChange log\n----------\n\nv2.0.0\n~~~~~~\n\n* Connections are now thread-local to avoid race conditions after Redis master failover\n* Removed support for `REDIS_{HOST, PORT, DB}` config variables\n\nv1.0.0\n~~~~~~\n\n* Moved URL handling code to a separate library, `redis_sentinel_url`\n* Backward-incompatible change::\n\n # Old\n redis+sentinel://host:port/service?slave=true\n\n Should now be written as::\n\n # New\n redis+sentinel://host:port/service?client_type=slave\n\nv0.2.0\n~~~~~~\n\n* Use config variables other than `REDIS_{HOST, PORT, DB}` even if `REDIS_URL` is used\n* Minor refactoring\n\nv0.1.0\n~~~~~~\n\n* Initial release\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/exponea/flask-redis-sentinel", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "Flask-Redis-Sentinel", "package_url": "https://pypi.org/project/Flask-Redis-Sentinel/", "platform": "", "project_url": "https://pypi.org/project/Flask-Redis-Sentinel/", "project_urls": { "Homepage": "https://github.com/exponea/flask-redis-sentinel" }, "release_url": "https://pypi.org/project/Flask-Redis-Sentinel/2.0.1/", "requires_dist": null, "requires_python": "", "summary": "Redis-Sentinel integration for Flask", "version": "2.0.1" }, "last_serial": 3471694, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "4de4e08f51dd7a72492c9a293ee17e22", "sha256": "1cb346c179f8b8d5c9f9e28677108df22c1b9fd25e9c5fe970050d4918bc005f" }, "downloads": -1, "filename": "Flask_Redis_Sentinel-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4de4e08f51dd7a72492c9a293ee17e22", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5579, "upload_time": "2015-07-29T15:49:45", "url": "https://files.pythonhosted.org/packages/c0/b2/f5a4401ee5ed9e8c466c20cca9b3984c1e23959106a192a8a7dd7489943a/Flask_Redis_Sentinel-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac02e4335dedde2a35d21b5a6f99a1d4", "sha256": "2ecb17722c6e55dc39385061024682871ed0990e85ffc1243808d2351734d82f" }, "downloads": -1, "filename": "Flask-Redis-Sentinel-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ac02e4335dedde2a35d21b5a6f99a1d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8645, "upload_time": "2015-07-29T15:49:49", "url": "https://files.pythonhosted.org/packages/d8/66/597541b4193dfc03de427401de04b9fb98d07567d4c918df685390b28765/Flask-Redis-Sentinel-0.1.0.tar.gz" } ], "0.2.0": [], "1.0.0": [ { "comment_text": "", "digests": { "md5": "93bbe709a5d3ac12beeae6aa8f77e125", "sha256": "9c2cc3e8254ae5bf76fff8d61ee1ba8e79c4353ee3851fdc2dae7d86d26d6da0" }, "downloads": -1, "filename": "Flask_Redis_Sentinel-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "93bbe709a5d3ac12beeae6aa8f77e125", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4889, "upload_time": "2016-08-24T07:14:42", "url": "https://files.pythonhosted.org/packages/71/12/ec0af3251e305b100383a70e9333b94f50729d78f25e17c52975f9628c5c/Flask_Redis_Sentinel-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "03bb10cc27c8a3da67894f39e1dec930", "sha256": "c23c46b1ff75935e863f3f459eab10f62fd2746570b5dcbe894c01475fa7adb3" }, "downloads": -1, "filename": "Flask-Redis-Sentinel-1.0.0.tar.gz", "has_sig": false, "md5_digest": "03bb10cc27c8a3da67894f39e1dec930", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8223, "upload_time": "2016-08-24T07:14:44", "url": "https://files.pythonhosted.org/packages/f3/71/0e09e6afbdb3d5cbef8b2a04ca4bee7dd85f6d228e6f22a5b63e9957d153/Flask-Redis-Sentinel-1.0.0.tar.gz" } ], "2.0.0": [], "2.0.1": [ { "comment_text": "", "digests": { "md5": "e48ec6fddcdbc9bd0f7a39d3e725d0ee", "sha256": "0deb2bef4977144a008bae2457c931ff8b1f3f97dce94c09003ed360e39f89a4" }, "downloads": -1, "filename": "Flask_Redis_Sentinel-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e48ec6fddcdbc9bd0f7a39d3e725d0ee", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6770, "upload_time": "2017-09-22T11:18:33", "url": "https://files.pythonhosted.org/packages/2a/60/a19904c7342ac87f0343e6b3476fcaaf62015eb5443e1424d6830359552f/Flask_Redis_Sentinel-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e8ffb50624f727f7720a139c5bfadf9f", "sha256": "a17ef135f607f1531fd80a283368ef5f11ecf5a4237b48fd192549e8c8998f02" }, "downloads": -1, "filename": "Flask-Redis-Sentinel-2.0.1.tar.gz", "has_sig": false, "md5_digest": "e8ffb50624f727f7720a139c5bfadf9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8321, "upload_time": "2017-09-22T11:18:31", "url": "https://files.pythonhosted.org/packages/7f/11/ab88b51564ea413c94c5a6b31df6b2f5b074d54c2952496734bf73bb0130/Flask-Redis-Sentinel-2.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e48ec6fddcdbc9bd0f7a39d3e725d0ee", "sha256": "0deb2bef4977144a008bae2457c931ff8b1f3f97dce94c09003ed360e39f89a4" }, "downloads": -1, "filename": "Flask_Redis_Sentinel-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e48ec6fddcdbc9bd0f7a39d3e725d0ee", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6770, "upload_time": "2017-09-22T11:18:33", "url": "https://files.pythonhosted.org/packages/2a/60/a19904c7342ac87f0343e6b3476fcaaf62015eb5443e1424d6830359552f/Flask_Redis_Sentinel-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e8ffb50624f727f7720a139c5bfadf9f", "sha256": "a17ef135f607f1531fd80a283368ef5f11ecf5a4237b48fd192549e8c8998f02" }, "downloads": -1, "filename": "Flask-Redis-Sentinel-2.0.1.tar.gz", "has_sig": false, "md5_digest": "e8ffb50624f727f7720a139c5bfadf9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8321, "upload_time": "2017-09-22T11:18:31", "url": "https://files.pythonhosted.org/packages/7f/11/ab88b51564ea413c94c5a6b31df6b2f5b074d54c2952496734bf73bb0130/Flask-Redis-Sentinel-2.0.1.tar.gz" } ] }