API¶
pico_data_redis.factory ¶
Provides a shared redis.Redis client built from RedisSettings.
RedisLifecycle ¶
Closes the shared client's connection pool on container shutdown.
Source code in src/pico_data_redis/factory.py
pico_data_redis.cache_backend ¶
Distributed cache backend for pico-caching.
Satisfies pico-caching's CacheBackend Protocol structurally — no import of pico-caching needed. Installing pico-data-redis next to pico-caching makes @cacheable distributed: the interceptor prefers any non-in-memory backend it finds in the container.
Values are pickled: @cacheable caches arbitrary Python results. That makes the cache trusted storage — anyone who can write to Redis can execute code in consumers. Keep it on a private instance, as with celery result backends.
pico_data_redis.config ¶
Settings for pico-data-redis (prefix redis, zero-config).
RedisSettings dataclass ¶
Installing pico-data-redis opts the app into Redis: the client and the cache backend activate with these defaults.