pico-caching
Declarative method caching for the Pico ecosystem: @cacheable over pico-ioc method interception, pluggable backends, auto-discovered by pico-boot. Zero-config.
Install
pip install pico-caching
Use
from pico_ioc import component
from pico_caching import cacheable
@component
class UserRepo:
@cacheable(ttl_seconds=60)
async def find(self, user_id: int): ...
@cacheable(key=lambda q: f"search:{q}")
def search(self, q: str): ...
Sync and async (the awaited result is cached, never the coroutine). Default backend: thread-safe in-memory LRU with per-entry TTL (caching.max_entries, caching.default_ttl_seconds). Bring your own backend by implementing the CacheBackend protocol as a @component — it replaces the built-in automatically.
# application.yaml (optional)
caching:
default_ttl_seconds: 300
max_entries: 1024
Skipped for now: @cache_evict and a Redis backend — planned once real usage asks for them.
Documentation
Full docs at dperezcabrera.github.io/pico-caching.
Built for AI-assisted development
pico-caching is part of an ecosystem designed for humans and coding agents building software together. Every package ships AGENTS.md working conventions, an llms.txt machine-readable docs index and documented behaviour pinned by regression tests; pico-testing gives agents a verification loop for their own changes, and releases are gated by the whole ecosystem booting together against real infrastructure. The full story: Built for AI-assisted development.
Install the agent skills for Claude Code or OpenAI Codex:
curl -sL https://raw.githubusercontent.com/dperezcabrera/pico-skills/main/install.sh | bash
The pico-conventions skill teaches the assistant this module's API surface and invariants; /add-component and /add-tests scaffold components and tests that use it.
License
MIT
Metadata
Release files for pico-caching 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pico_caching-0.1.2.tar.gz | 23.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pico_caching-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.7 kB
Release files / pico_caching-0.1.2.tar.gz
| Download URL | pico_caching-0.1.2.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b3591b1d302f9113aa3c4906808038ddf9d3f8969971e3047ec4118f774dd49
|
|
BLAKE2b-256 checksum How to use checksums |
e03f0a97a53ee08297d6f171d96b553706896811a81701209df7daadff6c7cb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / pico_caching-0.1.2-py3-none-any.whl
| Download URL | pico_caching-0.1.2-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f289a07f3652a0005d435da076e5c6d02c44a1c64432e8b5508b0b18f5865e8
|
|
BLAKE2b-256 checksum How to use checksums |
42634c0639f2b2410227a6d7e7b1fb6b20b89b99b5afdfb3cb6ede88e0210e99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency log