Skip to main content

Redis cache to use with Py Easy REST

Project description

Lint Build and Test Upload Package PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-easy-rest-redis-cache-0.1.3.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

py_easy_rest_redis_cache-0.1.3-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page