hiredis
Python wrapper for hiredis
Decision gist · record as of 2026-08-14
Yes, if you use a Redis client library that supports hiredis integration and your workload involves frequent multi-bulk replies. Install friction is moderate (C compilation required, but wheels available); maintenance is active; no known vulnerabilities. Skip it if your Redis usage is light or your client library does not support it.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Python 3.8+ required; C compiler and Python development headers needed for source builds.
- Prebuilt wheels available for common platforms.
- Medium install friction due to C extension compilation; prebuilt wheels available for common platforms (Python 3.10–3.14, Linux/macOS/Windows).
License · maintenance · safety
MIT (permissive) — MIT license is permissive and imposes no significant restrictions on use, modification, or distribution in commercial or private projects.
last release 2026-08-07 (7 days) · last repo commit 2026-08-10 · 522 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 29,422,261 downloads/mo, #814 on PyPI
Alternatives
Verify before relying
import hiredis
reader = hiredis.Reader()
reader.feed(b"$5\r\nhello\r\n")
result = reader.gets()
print(result) # b'hello'- Whether prebuilt wheels cover all target deployment platforms and Python versions in your environment
- Performance gains for your specific Redis command patterns and data sizes relative to pure-Python parsing
What it is and what it does
hiredis is a Python extension that wraps the C hiredis protocol parser, designed to accelerate Redis reply parsing. It provides a `Reader` class that buffers incoming Redis protocol data and extracts complete replies on demand, with support for custom encodings and error handling. The module does not handle I/O itself—it is meant to be integrated into a Redis client library or custom connection handler to replace pure-Python parsing.
The primary benefit is speed: benchmarks show minimal improvement for simple SET/GET operations, but dramatic gains for multi-bulk replies (arrays of bulk strings), with improvements ranging from 2.7x to 83.2x depending on reply size. It requires Python 3.8+ and C compilation at install time, though prebuilt wheels are available for most platforms.
Use it for
- Accelerate redis-py or other Python Redis clients by replacing their default reply parser with hiredis
- Parse large LRANGE or other multi-bulk Redis replies in high-throughput applications where parsing latency matters
- Decode Redis replies with custom character encodings (UTF-8, Latin-1, etc.) while maintaining C-level parsing speed
- Handle Redis protocol errors and custom error types in applications that need strict error classification
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use a Redis client library that supports hiredis integration and your workload involves frequent multi-bulk replies.
Install friction is moderate (C compilation required, but wheels available); maintenance is active; no known vulnerabilities. Skip it if your Redis usage is light or your client library does not support it.
Install
hiredis on PyPI
Before you install
Medium install friction due to C extension compilation; prebuilt wheels available for common platforms (Python 3.10–3.14, Linux/macOS/Windows). Requires Python development headers on source builds. Project is actively maintained with recent releases.
Python 3.8+ required; C compiler and Python development headers needed for source builds. Prebuilt wheels available for common platforms.
License in practice
MIT license is permissive and imposes no significant restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
import hiredis
reader = hiredis.Reader()
reader.feed(b"$5\r\nhello\r\n")
result = reader.gets()
print(result) # b'hello'
Verify before relying
- Whether prebuilt wheels cover all target deployment platforms and Python versions in your environment
- Performance gains for your specific Redis command patterns and data sizes relative to pure-Python parsing
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 29,422,261 / month, #814 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.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development |
Evidence: hiredis-3.4.1-cp310-cp310-macosx_10_15_universal2.whl; hiredis-3.4.1-cp310-cp310-macosx_10_15_x86_64.whl; hiredis-3.4.1-cp310-cp310-macosx_11_0_arm64.whl; hiredis-3.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; hiredis-3.4.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; hiredis-3.4.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl; hiredis-3.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; hiredis-3.4.1-cp310-cp310-musllinux_1_2_aarch64.whl; hiredis-3.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl; hiredis-3.4.1-cp310-cp310-musllinux_1_2_s390x.whl; hiredis-3.4.1-cp310-cp310-musllinux_1_2_x86_64.whl; hiredis-3.4.1-cp310-cp310-win32.whl; hiredis-3.4.1-cp310-cp310-win_amd64.whl; hiredis-3.4.1-cp310-cp310-win_arm64.whl; hiredis-3.4.1-cp311-cp311-macosx_10_15_universal2.whl; hiredis-3.4.1-cp311-cp311-macosx_10_15_x86_64.whl; hiredis-3.4.1-cp311-cp311-macosx_11_0_arm64.whl; hiredis-3.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; hiredis-3.4.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; hiredis-3.4.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.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 › “fast redis client”
- hiredishiredis wraps the C hiredis library to parse Redis protocol replies…
- libvalkeylibvalkey is a Python C extension that accelerates parsing of…
- redisPython client library for connecting to and executing commands…
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 libvalkey · aioredis · redis-cli · flask-redis · fakeredis · redis · mail-parser-reply · redis-simple-mq · burner-redis · redis-py-cluster