skillfed

brotlipy

Python binding to the Brotli library

brotlipy v0.7.0 1.9M downloads/30d#3,470 on PyPI154
Permissive license MIT Active released

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 brotlipy

uv

uv add brotlipy

poetry

poetry add brotlipy

Installing 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

Programming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

brotli compression pythonpython brotli encoder decodercompress decompress brotlibrotli bindings pythonstreaming compression brotli
compressionbrotli

More Utilities packages