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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21c810fad7d2e033e487bb5d5d194e5f6ce479b533a845af512de50f657fac8d |
|
MD5 | 5f6071437a8bea5d3a4a2e996b740199 |
|
BLAKE2b-256 | 7144edfb8f0ccda506baacaa5134fe296ec501d30e63fb4d5f096c676e3c15ad |
Close
Hashes for py_easy_rest_memory_cache-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b03c2f58be415a2ceb1e3e551234b57346871c71fb9a25dedfde3232368b8426 |
|
MD5 | 3fa45dcb59532acd201f4ba1144aaa55 |
|
BLAKE2b-256 | 6501fdbd851fea2c62c2085cf4bf4f19aa0fc5be71177b08481846d05c86b424 |