brotli
Python bindings for the Brotli compression library
Install
brotli on PyPI
pip
pip install brotliuv
uv add brotlipoetry
poetry add brotliPackage facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 281 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: brotli-1.2.0-cp27-cp27m-macosx_10_9_x86_64.whl; brotli-1.2.0-cp27-cp27m-manylinux1_i686.whl; brotli-1.2.0-cp27-cp27m-manylinux1_x86_64.whl; brotli-1.2.0-cp27-cp27mu-manylinux1_i686.whl; brotli-1.2.0-cp27-cp27mu-manylinux1_x86_64.whl; brotli-1.2.0-cp27-cp27m-win32.whl; brotli-1.2.0-cp27-cp27m-win_amd64.whl; brotli-1.2.0-cp310-cp310-macosx_10_9_universal2.whl; brotli-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl; brotli-1.2.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; brotli-1.2.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; brotli-1.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; brotli-1.2.0-cp310-cp310-musllinux_1_2_aarch64.whl; brotli-1.2.0-cp310-cp310-musllinux_1_2_ppc64le.whl; brotli-1.2.0-cp310-cp310-musllinux_1_2_x86_64.whl; brotli-1.2.0-cp310-cp310-win32.whl; brotli-1.2.0-cp310-cp310-win_amd64.whl; brotli-1.2.0-cp311-cp311-macosx_10_9_universal2.whl; brotli-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl; brotli-1.2.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
About brotli
from the package's own PyPI description — quoted content, verbatim
<p align="center"> <img src="https://github.com/google/brotli/actions/workflows/build_test.yml/badge.svg" alt="GitHub Actions Build Status" href="https://github.com/google/brotli/actions?query=branch%3Amaster"> <img src="https://oss-fuzz-build-logs.storage.googleapis.com/badges/brotli.svg" alt="Fuzzing Status" href="https://oss-fuzz-build-logs.storage.googleapis.com/index.html#brotli"> </p> <p align="center"><img src="https://brotli.org/brotli.svg" alt="Brotli" width="64"></p>
Introduction
Brotli is a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling, with a compression ratio comparable to the best currently available general-purpose compression methods. It is similar in speed with deflate but offers more dense compression.
The specification of the Brotli Compressed Data Format is defined in RFC 7932.
Brotli is open-sourced under the MIT License, see the LICENSE file.
> Please note: brotli is a "stream" format; it does not contain > meta-information, like checksums or uncompressed data...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Brotli provides Python bindings for the Brotli compression library, a lossless compression algorithm offering compression ratios comparable to the best general-purpose methods while maintaining deflate-like speed.
Medium install friction due to compiled C/C++ components requiring a build toolchain; however, prebuilt wheels are available for Python 2.7 through 3.11 across Linux, macOS, and Windows platforms. The package is actively maintained with recent releases.
MIT license permits commercial and private use with minimal restrictions; users need only retain the license notice in distributions.
Usage
pip install brotli
import brotli
compressed = brotli.compress(b'data')
decompressed = brotli.decompress(compressed)
A C/C++ compiler and build tools are required if installing from source; prebuilt wheels eliminate this requirement for common platforms and Python versions.
Verdict: Brotli is a well-maintained, actively developed compression library in the top 1000 PyPI packages with no known vulnerabilities. The MIT license is permissive. Install friction is moderate due to compiled dependencies, but extensive prebuilt wheels mitigate this for standard environments. Suitable for production use where Brotli compression is needed.
Needs verification
- Whether the package's Python API stability and backward compatibility guarantees extend beyond the current release cycle
- Performance characteristics and memory overhead compared to alternative compression libraries in typical workloads
Similar packages
permissive · top 1,000 on PyPI
flatbufferspermissive · top 1,000 on PyPI
absl-pypermissive · top 1,000 on PyPI
zopflipermissive · top 1,000 on PyPI
pbs-installerpermissive · top 1,000 on PyPI
hpackpermissive · top 1,000 on PyPI
fastavropermissive · top 1,000 on PyPI
httplib2permissive · top 1,000 on PyPI
kiwisolverpermissive · top 1,000 on PyPI
zstandardpermissive · top 1,000 on PyPI