Skip to main content

patera-caching

Response caching for Patera with in-memory, Redis and SQLite backends. Part of Patera, a modular async-first Python web framework.

Installation

pip install patera-caching
# or, with uv
uv add "patera[caching]"

Requires Python 3.13 or newer and patera>=0.121.

Usage

patera-caching caches responses of endpoints:

from patera.caching import Caching, CachingConfig, cache


class PublicCache(Caching):
    pass                                 # in-memory backend by default


class Config(BaseConfig):
    ...
    PUBLIC_CACHE: CachingConfig = CachingConfig(DURATION=60, MAX_SIZE=1000)


@path("/stats")
class StatsApi(Controller[App]):
    @get("/")
    @cache("PUBLIC_CACHE", duration=15)  # registered name of the extension
    async def stats(self, req: Request) -> Response:
        return req.res.json(await compute_stats())

See the Caching section of the Patera documentation for the full guide.

License

MIT. See LICENSE.

Metadata

Release files for patera-caching 0.12.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 patera-caching 0.12.0
File Size Uploaded Provenance Actions
patera_caching-0.12.0.tar.gz 11.8 kB Without provenance Details for patera_caching-0.12.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for patera-caching 0.12.0
File Interpreter ABI Platform Actions
patera_caching-0.12.0-py3-none-any.whl Python 3 none any Details for patera_caching-0.12.0-py3-none-any.whl

Total release size: 28.6 kB

Release files / patera_caching-0.12.0.tar.gz

Download URL patera_caching-0.12.0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1d304746bd6cb32a06e55294aae7465a78d22bb5e31945183f477fdf82da5114
BLAKE2b-256 checksum
How to use checksums
dfd40f8bd618a89dbc47b539acd925705590f46f51705744e78156d57e6d7142
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / patera_caching-0.12.0-py3-none-any.whl

Download URL patera_caching-0.12.0-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
891c581d489e6e299a9e063e7c7f019eada46415c96e18e689fa56dfb5f6da6f
BLAKE2b-256 checksum
How to use checksums
032e5f14589c547c8121ae5a69aaec2cf1ce7ad0d6a11b8c3726fdcca1689cac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for patera-caching 0.12.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.

Release history Release notifications | RSS feed

This release

0.12.0 This release

2 release files No provenance

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