quart-redis


Namequart-redis JSON
Version 2.0.0 PyPI version JSON
download
home_page
SummaryA easy way of setting up a redis in quart
upload_time2023-03-21 19:51:25
maintainer
docs_urlNone
authorLeo Spratt
requires_python>=3.9
licenseMIT
keywords quart asyncio redis cache
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Quart-Redis
[![Documentation Status](https://readthedocs.org/projects/quart-redis/badge/?version=latest)](https://quart-redis.readthedocs.io/en/latest/)
![PyPI](https://img.shields.io/pypi/v/quart-redis)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/quart-redis)
![PyPI - Downloads](https://img.shields.io/pypi/dm/quart-redis)
![GitHub](https://img.shields.io/github/license/enchant97/quart-redis)
![GitHub issues](https://img.shields.io/github/issues/enchant97/quart-redis)
![GitHub last commit](https://img.shields.io/github/last-commit/enchant97/quart-redis)

An easy way of setting up a redis connection in quart.

## Requirements
- quart >= 0.18
- redis >= 4.2

## Example of Use
```
pip install quart-redis
```

```python
from quart import Quart
from quart_redis import RedisHandler, get_redis

app = Quart(__name__)
app.config["REDIS_URI"] = "redis://localhost"
# override default connection attempts, set < 0 to disable
# app.config["REDIS_CONN_ATTEMPTS"] = 3
redis_handler = RedisHandler(app)

@app.route("/")
async def index():
    redis = get_redis()

    val = await redis.get("my-key")

    if val is None:
        await redis.set("my-key", "it works!")
        val = await redis.get("my-key")

    return val
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "quart-redis",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "quart,asyncio,redis,cache",
    "author": "Leo Spratt",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/4e/c7/a68e4e7f5b375d4c24c05b8b2e266b720297d83dd85f6c2524aaa4cb8c42/quart-redis-2.0.0.tar.gz",
    "platform": null,
    "description": "# Quart-Redis\n[![Documentation Status](https://readthedocs.org/projects/quart-redis/badge/?version=latest)](https://quart-redis.readthedocs.io/en/latest/)\n![PyPI](https://img.shields.io/pypi/v/quart-redis)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/quart-redis)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/quart-redis)\n![GitHub](https://img.shields.io/github/license/enchant97/quart-redis)\n![GitHub issues](https://img.shields.io/github/issues/enchant97/quart-redis)\n![GitHub last commit](https://img.shields.io/github/last-commit/enchant97/quart-redis)\n\nAn easy way of setting up a redis connection in quart.\n\n## Requirements\n- quart >= 0.18\n- redis >= 4.2\n\n## Example of Use\n```\npip install quart-redis\n```\n\n```python\nfrom quart import Quart\nfrom quart_redis import RedisHandler, get_redis\n\napp = Quart(__name__)\napp.config[\"REDIS_URI\"] = \"redis://localhost\"\n# override default connection attempts, set < 0 to disable\n# app.config[\"REDIS_CONN_ATTEMPTS\"] = 3\nredis_handler = RedisHandler(app)\n\n@app.route(\"/\")\nasync def index():\n    redis = get_redis()\n\n    val = await redis.get(\"my-key\")\n\n    if val is None:\n        await redis.set(\"my-key\", \"it works!\")\n        val = await redis.get(\"my-key\")\n\n    return val\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A easy way of setting up a redis in quart",
    "version": "2.0.0",
    "split_keywords": [
        "quart",
        "asyncio",
        "redis",
        "cache"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71aef5dac578068a6aad7a9489104fef8fe25258c2a22a6eec751c9b43503a89",
                "md5": "35e185e3e53c28908bcc025d2e5040e3",
                "sha256": "13fcd66245c20dc3c292245f5c3de8b7ecd1353ab64052883e9c051a39091de8"
            },
            "downloads": -1,
            "filename": "quart_redis-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "35e185e3e53c28908bcc025d2e5040e3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 3826,
            "upload_time": "2023-03-21T19:51:23",
            "upload_time_iso_8601": "2023-03-21T19:51:23.964012Z",
            "url": "https://files.pythonhosted.org/packages/71/ae/f5dac578068a6aad7a9489104fef8fe25258c2a22a6eec751c9b43503a89/quart_redis-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ec7a68e4e7f5b375d4c24c05b8b2e266b720297d83dd85f6c2524aaa4cb8c42",
                "md5": "96ddfb63671bafca5e7b35ed2e9b096a",
                "sha256": "c5bf5d23da973e415a65e2b342242ebacb3734aeb61cde58bcce099dec66a1a9"
            },
            "downloads": -1,
            "filename": "quart-redis-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "96ddfb63671bafca5e7b35ed2e9b096a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 3683,
            "upload_time": "2023-03-21T19:51:25",
            "upload_time_iso_8601": "2023-03-21T19:51:25.253639Z",
            "url": "https://files.pythonhosted.org/packages/4e/c7/a68e4e7f5b375d4c24c05b8b2e266b720297d83dd85f6c2524aaa4cb8c42/quart-redis-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-21 19:51:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "quart-redis"
}
        
Elapsed time: 0.05023s