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 import PYRSanicAppBuilder
from py_easy_rest.service import PYRService
from py_easy_rest_redis_cache import PYRRedisCache
config = {
"name": "Project Name",
"schemas": [{
"name": "Mock",
"slug": "mock",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer"},
},
"required": ["name"],
}]
}
cache = PYRRedisCache("redis://localhost")
service = PYRService(api_config_mock, cache=cache)
sanic_app = PYRSanicAppBuilder.build(api_config_mock, service)
sanic_app.run(
host='0.0.0.0',
port=8000,
debug=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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6d59040674d09c6a42a9e9416f0aad0ceca3646e63e169d714712fb5112f1ea |
|
MD5 | 4ce05981dc3d1ebbc4e7441d6a01dc2d |
|
BLAKE2b-256 | f6ecea2035a086a909d1c8172e35f8a3d5dc7e701d61c186287a3bb401c3e8b9 |
Close
Hashes for py_easy_rest_redis_cache-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25ef6e6d3030e0c32b6667f08acefca770bdd715acbbb07340e0b8abe30f0c08 |
|
MD5 | 01bb354bc8bc99b9aeddef700f8f1161 |
|
BLAKE2b-256 | 45c211ea18b7424e37388417fa057d6d1d7b5119eefa9479d75a88213ffe75c2 |