github.com/brainix/pottery ↗
Redis for humans. 🌎🌍🌏
Open this visualization on its own page →
Contributors
3
Lines of Code
1,006
From
2016-07-09
To
2020-12-27
About brainix/pottery
Pottery is a Python library that provides intuitive, dict-like interfaces to Redis data structures, making it easier to work with Redis without needing to learn its command syntax. The library includes Redis-backed implementations of standard Python containers such as dicts, sets, lists, counters, and deques, all designed to mimic the behavior of their native Python equivalents. Beyond basic data structures, Pottery provides distributed locking through Redlock (with both synchronous and asyncio support), distributed ID generation via NextID, function result caching with redis_cache, Bloom filters for probabilistic membership testing, HyperLogLogs for cardinality estimation, and utility tools like ContextTimer for measuring elapsed time.
The project has been battle-tested in production at scale and emphasizes resilience patterns for microservice architectures. It handles the complexity of Redis operations behind the scenes while maintaining Python conventions, so developers familiar with standard Python data structures can immediately use Pottery without extensive learning. The library supports key features like non-blocking and timeout-based lock acquisition, automatic lock expiration to prevent deadlocks, and various caching strategies. Most containers require JSON-serializable keys and values, and distributed primitives like Redlock are designed to work across multiple Redis instances to eliminate single points of failure.