Skip to main content

Cachepot

The FastAPI cache the way it should be.

Installation

pip install fastapi-cachepot

Usage

import redis.asyncio as redis

from cachepot.app import CachedFastAPI
from cachepot.constants import CachePolicy
from cachepot.storages import RedisStorage

app = CachedFastAPI()

client = redis.from_url('redis://127.0.0.1:6379')
storage = RedisStorage(client)

cache_policy = CachePolicy(
    storage=storage,
    key='cached_hello_world',
    ttl=30,
)


@app.get(path='', cache_policy=cache_policy)
async def cached_hello_world():
    return {'result': 'hello, world!'}

Metadata

Release files for fastapi-cachepot 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastapi-cachepot 0.1.0
File Size Uploaded Provenance Actions
fastapi_cachepot-0.1.0.tar.gz 26.3 kB Without provenance Details for fastapi_cachepot-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fastapi-cachepot 0.1.0
File Interpreter ABI Platform Actions
fastapi_cachepot-0.1.0-py3-none-any.whl Python 3 none any Details for fastapi_cachepot-0.1.0-py3-none-any.whl

Total release size: 52.4 kB

Release files / fastapi_cachepot-0.1.0.tar.gz

Download URL fastapi_cachepot-0.1.0.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b3d83bcd3017a3ae094866a5a00ea5c78934dfdb3d4e433c73f036e4824827a9
BLAKE2b-256 checksum
How to use checksums
7616f8968cc5cf359fef2365bcaf0f597a7aebc3d4f0bab070c319c0a76ced0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.9 Darwin/23.2.0

Release files / fastapi_cachepot-0.1.0-py3-none-any.whl

Download URL fastapi_cachepot-0.1.0-py3-none-any.whl
Size 26.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afd349a0aaee0aa2f6153b8d178933cb7629bfd21a4e60a297cb8f1125b4780e
BLAKE2b-256 checksum
How to use checksums
1d9f801897993bb2aff379bf30c04e2b4757a523384b1d7389931c01f20b681e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.9 Darwin/23.2.0

Security for fastapi-cachepot 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page