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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file py-easy-rest-redis-cache-0.1.3.tar.gz.

File metadata

File hashes

Hashes for py-easy-rest-redis-cache-0.1.3.tar.gz
Algorithm Hash digest
SHA256 df063c67b53131efc482bf46b5ff15b1ad87b310d984ad71e43162edd91d18ef
MD5 7f439a585c1455eb316e3f1580bf3c83
BLAKE2b-256 d68922746166d343c7c2fce97c23d27dd5ac069d1604a344a94a6abbbd7facd1

See more details on using hashes here.

File details

Details for the file py_easy_rest_redis_cache-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for py_easy_rest_redis_cache-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a83506c011d382309beffeaa7a7f3555b6b30b5bfd722440eaf1c810d76c6dca
MD5 45c5265685b454ad01437c9b4e7ee545
BLAKE2b-256 7f6e411a8078bdfae1d1761495607283b6d98467b01b37679a9d0b57cecc5e25

See more details on using hashes here.

Supported by

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