walrus
a set of utilities for working with redis
What it is and what it does
Walrus is a lightweight wrapper around redis-py that adds Pythonic abstractions for working with Redis. It subclasses the standard redis-py client, so you can use it as a drop-in replacement while gaining access to higher-level utilities. The package provides container classes that map Redis data types (Hash, List, Set, Sorted Set, HyperLogLog, BitField, BloomFilter) to Python-like objects, plus specialized tools for streams with consumer group support, caching with decorators, full-text search with boolean queries, graph storage, rate limiting, and locking.
The package also includes experimental active-record-style Models built on Hashes, supporting secondary indexes for filtering and basic full-text search. It's designed for developers who want to work with Redis more naturally in Python without learning a separate library API. The single runtime dependency is redis itself.
Use it for:
- Cache function results using decorators to avoid repeated computation or database queries.
- Implement distributed rate limiting or locking across multiple application instances.
- Build autocomplete or full-text search features on top of Redis data structures.
- Work with Redis streams and consumer groups for event processing or message queues.
- Store and query structured data using Models with secondary indexes.
- Use Bloom filters or HyperLogLog for approximate membership testing or cardinality estimation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Walrus extends the redis-py client with Pythonic container classes and higher-level abstractions for Redis data types, streams, caching, full-text search, and models.
Yes, with conditions. Walrus is stable, low-friction to install, and offers genuine convenience over raw redis-py for common patterns like caching and streams. However, verify the license terms before use (metadata is unclear), and be aware that maintenance is aging—the last release was 211 days ago. The experimental Models feature may not be production-ready. For straightforward Redis operations, it's a solid choice; for mission-critical systems, confirm support expectations.
Install
walrus on PyPI
pip
pip install walrusuv
uv add walruspoetry
poetry add walrusInstalling walrus
Before you install
Low install friction; pure Python wheel. Maintenance status is aging—last commit was 2026-01-15 and no release in 211 days—but the repository remains active and unarchived with 1205 stars.
License in practice
License treatment is unclear; no SPDX identifier or raw license text is available in the package metadata. Verify the actual license before use in proprietary or restrictive-license contexts.
Quickstart
pip install walrus
import walrus
db = walrus.Database()
my_hash = db.Hash('my_key')
my_hash['field'] = 'value'
Requires a running Redis server.
Verify before relying
- Exact Python version support is unspecified; classifiers list both Python 2 and 3 but requires_python is null.
- License details are not declared in package metadata; verify licensing terms in the repository.
- Stability of experimental features (Models, secondary indexes) and their production readiness.
- Default Redis connection parameters and whether they require explicit configuration.
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — redis |
| Maintenance | aging — 211 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 125,440/month — #11,818 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: walrus-0.9.8-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
redisvlRedisVL is a Python client for building AI…
permissive · top 5,000 on PyPI
redis-cliProvides a lightweight wrapper around redis-py…
permissive · top 15,000 on PyPI
flask-redisIntegrates Redis into Flask applications as a…
unclear · top 15,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
django-redisProvides a Redis cache and session backend for…
permissive · top 5,000 on PyPI
redis-entraidProvides Entra ID (Azure Active Directory)…
unclear · top 5,000 on PyPI
upstash-redisHTTP-based Redis client for Python that…
permissive · top 5,000 on PyPI
types-redisProvides type stubs for the redis package,…
permissive · top 1,000 on PyPI
hueyHuey is a lightweight task queue library that…
unclear · top 5,000 on PyPI