libvalkey
Python wrapper for libvalkey
Decision gist · record as of 2026-08-14
Yes, if you are using Valkey or Redis with Python and handle large multi-bulk replies. The performance gains are modest for simple operations (1.1x for SET/GET) but dramatic for larger replies (83.2x for LRANGE 0 999). Install friction is medium due to C compilation requirements. No security vulnerabilities and actively maintained. MIT license poses no restrictions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires C compiler (gcc) and Python development headers (python3-dev on Ubuntu/Debian).
- Python 3.9 or later required.
- Medium install friction due to compiled C extension requiring build tools and Python development headers.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use this package freely in commercial and private projects without restriction or obligation to share modifications.
last release 2026-07-18 (27 days) · last repo commit 2026-08-02 · 3 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 919,709 downloads/mo, #4,720 on PyPI
Alternatives
Verify before relying
pip install libvalkey
import libvalkey
reader = libvalkey.Reader()
reader.feed(b"$5\r\nhello\r\n")
result = reader.gets()
print(result) # b'hello'- Whether performance improvements apply to your specific workload patterns and Valkey/Redis usage
- Compatibility with alternative Valkey/Redis client libraries beyond valkey-py
What it is and what it does
libvalkey is a Python extension that wraps the C library libvalkey to speed up parsing of Valkey and Redis protocol replies. It provides a `Reader` class that buffers incoming data and parses RESP (Redis Serialization Protocol) replies incrementally. The extension is designed to integrate with Valkey/Redis client libraries to accelerate reply parsing, particularly for multi-bulk replies where the performance gains are most significant.
The package requires Python 3.9 or later and needs C compilation during installation, which means you need a C compiler and Python development headers available on your system. It has no runtime dependencies and is designed as a low-level parsing component rather than a standalone client library—it handles protocol parsing only and does not provide I/O functionality.
Use it for
- Accelerate Valkey/Redis client performance when handling large multi-bulk replies like LRANGE results
- Integrate into custom Valkey/Redis client implementations that need faster protocol parsing
- Reduce latency in high-throughput Valkey/Redis workloads where reply parsing is a bottleneck
- Parse RESP protocol data with custom encoding support (UTF-8, etc.) and error handling
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are using Valkey or Redis with Python and handle large multi-bulk replies.
The performance gains are modest for simple operations (1.1x for SET/GET) but dramatic for larger replies (83.2x for LRANGE 0 999). Install friction is medium due to C compilation requirements. No security vulnerabilities and actively maintained. MIT license poses no restrictions.
Install
libvalkey on PyPI
Before you install
Medium install friction due to compiled C extension requiring build tools and Python development headers. Active maintenance with recent releases (27 days since last update); repository has low star count but is actively developed.
Requires C compiler (gcc) and Python development headers (python3-dev on Ubuntu/Debian). Python 3.9 or later required.
License in practice
MIT license is permissive; you can use this package freely in commercial and private projects without restriction or obligation to share modifications.
Quickstart
pip install libvalkey
import libvalkey
reader = libvalkey.Reader()
reader.feed(b"$5\r\nhello\r\n")
result = reader.gets()
print(result) # b'hello'
Verify before relying
- Whether performance improvements apply to your specific workload patterns and Valkey/Redis usage
- Compatibility with alternative Valkey/Redis client libraries beyond valkey-py
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 27 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 919,709 / month, #4,720 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/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: POSIXProgramming Language :: CProgramming 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.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development |
Evidence: libvalkey-4.1.0-cp310-cp310-macosx_11_0_arm64.whl; libvalkey-4.1.0-cp310-cp310-macosx_11_0_universal2.whl; libvalkey-4.1.0-cp310-cp310-macosx_11_0_x86_64.whl; libvalkey-4.1.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; libvalkey-4.1.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; libvalkey-4.1.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl; libvalkey-4.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; libvalkey-4.1.0-cp310-cp310-musllinux_1_2_aarch64.whl; libvalkey-4.1.0-cp310-cp310-musllinux_1_2_ppc64le.whl; libvalkey-4.1.0-cp310-cp310-musllinux_1_2_s390x.whl; libvalkey-4.1.0-cp310-cp310-musllinux_1_2_x86_64.whl; libvalkey-4.1.0-cp310-cp310-win32.whl; libvalkey-4.1.0-cp310-cp310-win_amd64.whl; libvalkey-4.1.0-cp311-cp311-macosx_11_0_arm64.whl; libvalkey-4.1.0-cp311-cp311-macosx_11_0_universal2.whl; libvalkey-4.1.0-cp311-cp311-macosx_11_0_x86_64.whl; libvalkey-4.1.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; libvalkey-4.1.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; libvalkey-4.1.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl; libvalkey-4.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.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 › “redis protocol parser”
- libvalkeylibvalkey is a Python C extension that accelerates parsing of…
- hiredishiredis wraps the C hiredis library to parse Redis protocol replies…
- aioredisAn asyncio-based Redis client library providing both low-level and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also hiredis · valkey · fakeredis · valkey-glide · opentelemetry-python-contrib-external-valkey · django-valkey · valkey-glide-sync · py-key-value-aio · redis · cachelib