Memory cache to use with Py Easy REST
Project description
py-easy-rest-memory-cache
Cache lib to use with py-easy-rest
Getting Started
How to install
pip install py-easy-rest py-easy-rest-memory-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-memory-cache import PYRMemoryCache
config = {
"name": "Project Name",
"schemas": [{
"name": "Mock",
"slug": "mock",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer"},
},
"required": ["name"],
}]
}
cache = PYRMemoryCache()
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-memory-cache-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 045dea36f33e832170924885eff5f8f344bf6f54fc0b48715e294a1b3520f21f |
|
MD5 | a5ebc4bd6b6209e3cc8561ad9a4e176a |
|
BLAKE2b-256 | 8d38fdb61489c0bd56f2aad64ca72319c65d3c7fa774427e8e999499a64a356d |
Close
Hashes for py_easy_rest_memory_cache-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05a956293472fe82610222f3e88f8f891d7273f40a4589ff5ee878c67f73b333 |
|
MD5 | aba23ce068861fdb3f8c1acb3f804d9f |
|
BLAKE2b-256 | b7f12ac9d28e9d3b1e2f67e2e46c6ca5330d1dc6229582e4340b9b686c521095 |