valkey
Python client for Valkey forked from redis-py
Decision gist · record as of 2026-08-14
Yes. Valkey-py is actively maintained, has no known vulnerabilities, installs with minimal friction, and provides a complete, production-stable Python interface to Valkey. It is the appropriate choice for any Python application that needs to interact with a Valkey server, whether for caching, sessions, pub/sub, or general key-value operations. The MIT license poses no restrictions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running Valkey server (e.g., via Docker or local installation) accessible on the specified host and port.
- Low install friction with a single lightweight runtime dependency (async-timeout).
- Active maintenance with recent commits and stable production status across Python 3.9–3.13.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; no copyleft obligations.
last release 2025-08-11 (368 days) · last repo commit 2026-08-04 · 278 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,914,004 downloads/mo, #2,013 on PyPI
Alternatives
Verify before relying
pip install valkey
import valkey
r = valkey.Valkey(host='localhost', port=6379, db=0)
r.set('foo', 'bar')
print(r.get('foo'))- Whether the optional libvalkey compiled parser (libvalkey >= 2.3.2) is automatically detected and used when installed.
- Performance characteristics and overhead of the async-timeout dependency under high concurrency.
- Compatibility guarantees with Valkey server versions beyond what the documentation states.
What it is and what it does
Valkey is a Python client library that provides a complete interface to the Valkey key-value store, a fork of Redis. It exposes all standard Valkey commands through native Python methods, handles connection pooling automatically, and supports both synchronous and asynchronous workflows. The library includes built-in support for advanced features like pipelining (batching commands to reduce round-trip overhead), pub/sub messaging, and RESP3 protocol negotiation.
The package is designed as a drop-in replacement for redis-py, with backward-compatible aliases available for a smooth migration path. It depends only on async-timeout for its core functionality and optionally integrates a compiled response parser (libvalkey) for improved performance when available. The library supports modern Python versions (3.9 through 3.13) and runs on both CPython and PyPy.
Use it for
- Build a session store or cache layer for web applications using synchronous or async connection pools.
- Implement real-time messaging or event distribution using pub/sub channels.
- Batch multiple database operations into a single round-trip using pipelines to reduce latency.
- Migrate existing redis-py code to Valkey with minimal changes using provided compatibility aliases.
- Store and retrieve structured data (strings, hashes, lists, sets) in a high-performance key-value store.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Valkey-py is actively maintained, has no known vulnerabilities, installs with minimal friction, and provides a complete, production-stable Python interface to Valkey. It is the appropriate choice for any Python application that needs to interact with a Valkey server, whether for caching, sessions, pub/sub, or general key-value operations. The MIT license poses no restrictions.
Install
valkey on PyPI
Before you install
Low install friction with a single lightweight runtime dependency (async-timeout). Active maintenance with recent commits and stable production status across Python 3.9–3.13.
Requires a running Valkey server (e.g., via Docker or local installation) accessible on the specified host and port.
License in practice
MIT license permits commercial and private use with minimal restrictions; no copyleft obligations.
Quickstart
pip install valkey
import valkey
r = valkey.Valkey(host='localhost', port=6379, db=0)
r.set('foo', 'bar')
print(r.get('foo'))
Verify before relying
- Whether the optional libvalkey compiled parser (libvalkey >= 2.3.2) is automatically detected and used when installed.
- Performance characteristics and overhead of the async-timeout dependency under high concurrency.
- Compatibility guarantees with Valkey server versions beyond what the documentation states.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageasync-timeout |
| Maintenance | Actively maintained 368 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,914,004 / month, #2,013 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: valkey-6.1.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “key-value store client”
- valkeyPython client library for connecting to and executing commands…
- python-etcdA Python client library for etcd, a distributed key-value store,…
- etcd3Python client library for etcd v3 that provides key-value storage…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also libvalkey · valkey-glide · valkey-glide-sync · django-valkey · redislite · py-key-value-aio · opentelemetry-python-contrib-external-valkey · redis-py-cluster · aioredis