brotlipy
Python binding to the Brotli library
What it is and what it does
brotlipy is a Python wrapper around Google's Brotli compression library. It exposes both one-shot compression and decompression functions and a streaming API for incremental processing. The package bundles the Brotli C library and compiles it during installation, so it has no Python runtime dependencies but does require a C compiler on platforms without prebuilt wheels.
The library is used to add Brotli support to Python applications that need efficient compression—commonly in HTTP clients and servers, data pipelines, and tools that work with Brotli-compressed content. It supports compression and decompression with configurable parameters, and includes a streaming decompressor with a finish() method for handling incomplete data.
Use it for:
- Decompress Brotli-encoded HTTP responses in web clients or scraping tools.
- Compress data for storage or transmission using Brotli in data processing pipelines.
- Incrementally decompress large Brotli-compressed files without loading them entirely into memory.
- Add Brotli support to HTTP servers or reverse proxies that handle compressed payloads.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
brotlipy provides Python bindings to the Brotli compression algorithm, allowing you to compress and decompress data using Brotli directly from Python code.
Yes, if you need Brotli compression in Python and are on a supported platform. The package is actively maintained with a recent commit on 2026-03-05, has no known vulnerabilities, and receives substantial downloads. However, the last release was 2017-05-30 and classifiers target Python 2.7 through 3.5; verify compatibility with your Python version before adopting in new projects.
Install
brotlipy on PyPI
pip
pip install brotlipyuv
uv add brotlipypoetry
poetry add brotlipyInstalling brotlipy
Before you install
Medium install friction due to compiled C extensions; prebuilt wheels are available for common platforms (Python 2.7, 3.3–3.5 on macOS, Linux, and Windows), but older Python versions and less common architectures may require compilation.
License in practice
Licensed under MIT; the underlying Brotli library is Apache License 2.0. Both are permissive, so you can use this in commercial and proprietary projects without restriction.
Quickstart
pip install brotlipy
import brotlipy
data = brotlipy.decompress(compressed_data)
Requires a C compiler if prebuilt wheels are not available for your Python version and platform.
Verify before relying
- Whether the package works reliably on modern Python versions given the last release was 2017-05-30.
- Current performance characteristics compared to alternative Brotli compression solutions.
- Compatibility with Python versions beyond 3.5 despite active repository status.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 3,363 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,876,211/month — #3,470 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: brotlipy-0.7.0-cp27-cp27m-macosx_10_6_intel.whl; brotlipy-0.7.0-cp27-cp27m-manylinux1_i686.whl; brotlipy-0.7.0-cp27-cp27m-manylinux1_x86_64.whl; brotlipy-0.7.0-cp27-cp27mu-manylinux1_i686.whl; brotlipy-0.7.0-cp27-cp27mu-manylinux1_x86_64.whl; brotlipy-0.7.0-cp27-cp27m-win32.whl; brotlipy-0.7.0-cp27-cp27m-win_amd64.whl; brotlipy-0.7.0-cp33-cp33m-macosx_10_6_intel.whl; brotlipy-0.7.0-cp33-cp33m-manylinux1_i686.whl; brotlipy-0.7.0-cp33-cp33m-manylinux1_x86_64.whl; brotlipy-0.7.0-cp33-cp33m-win32.whl; brotlipy-0.7.0-cp33-cp33m-win_amd64.whl; brotlipy-0.7.0-cp34-cp34m-macosx_10_6_intel.whl; brotlipy-0.7.0-cp34-cp34m-manylinux1_i686.whl; brotlipy-0.7.0-cp34-cp34m-manylinux1_x86_64.whl; brotlipy-0.7.0-cp34-cp34m-win32.whl; brotlipy-0.7.0-cp34-cp34m-win_amd64.whl; brotlipy-0.7.0-cp35-abi3-macosx_10_9_x86_64.whl; brotlipy-0.7.0-cp35-abi3-manylinux1_i686.whl; brotlipy-0.7.0-cp35-abi3-manylinux1_x86_64.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
brotliProvides Python bindings to the Brotli…
permissive · top 1,000 on PyPI
brotlicffiProvides Python CFFI bindings to the Brotli…
permissive · top 5,000 on PyPI
brotli-asgiBrotliMiddleware adds Brotli compression to…
permissive · top 15,000 on PyPI
python-lzfProvides Python bindings to the liblzf…
permissive · top 15,000 on PyPI
Flask-CompressFlask-Compress automatically compresses Flask…
permissive · top 5,000 on PyPI
python-neo-lzfProvides fast compression and decompression of…
permissive · top 15,000 on PyPI
astc-encoder-pyastc-encoder-py compresses and decompresses…
permissive · top 15,000 on PyPI
apple-compressPython bindings for Apple's libcompression…
unclear · top 15,000 on PyPI
lzallrightlzallright provides Python bindings to compress…
permissive · top 15,000 on PyPI
cramjamProvides fast Python bindings to multiple…
permissive · top 1,000 on PyPI