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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | df063c67b53131efc482bf46b5ff15b1ad87b310d984ad71e43162edd91d18ef |
|
MD5 | 7f439a585c1455eb316e3f1580bf3c83 |
|
BLAKE2b-256 | d68922746166d343c7c2fce97c23d27dd5ac069d1604a344a94a6abbbd7facd1 |
Close
Hashes for py_easy_rest_redis_cache-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a83506c011d382309beffeaa7a7f3555b6b30b5bfd722440eaf1c810d76c6dca |
|
MD5 | 45c5265685b454ad01437c9b4e7ee545 |
|
BLAKE2b-256 | 7f6e411a8078bdfae1d1761495607283b6d98467b01b37679a9d0b57cecc5e25 |