Redis cache to use with Py Easy REST
Project description
py-easy-rest-redis-cache
Cache lib to use with py-easy-rest
Getting Started
How to install
pip install py-easy-rest py-easy-rest-redis-cache
Integrating with your py-easy-rest app
#main.py
from py_easy_rest.server import App
from py_easy_rest_redis_cache.redis_cache import RedisCache
config = {
"name": "Project Name",
"schemas": [{
"name": "Mock",
"slug": "mock",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer"},
},
"required": ["name"],
}]
}
cache = RedisCache("redis://localhost")
pyrApp = App(config, cache=cache)
pyrApp.app.run(
host='0.0.0.0',
port=8000,
debug=True,
auto_reload=True,
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for py-easy-rest-redis-cache-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10a7de602d62f54daba1ab8c9612f8237d4b0d6e6f19f0f1ad2428efca4588d5 |
|
MD5 | 85c58d05d89c76143043d932a9d48613 |
|
BLAKE2b-256 | ff53dd906b0bef41f4d9d576a452f379ca46c4b3ab7768ea78620d81efd2215b |
Close
Hashes for py_easy_rest_redis_cache-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 607875ad76dc945b27247ead3bccee38aa3f3f193ecd4c4529e9d6bfe5ebb8d3 |
|
MD5 | f4e0d12c2e5792f3198a12fe378507d9 |
|
BLAKE2b-256 | 9f1b3ec5f7ac90301ae60c87fe9c718e09c6cc8cfccfd50a2e50b05099137b19 |