NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2452 most downloaded on PyPI
Compress responses in your Flask app with gzip, deflate, brotli or zstandard.
Last release 19 days ago
15 Sep 2026
Ships fairly regularly
a new release about every 6 months
Some releases are documented
notes for 20 of 34 stable releases
1 version withdrawn
withdrawn after publishing
13 years old
35 releases · first in 2013
support, and test against, Python 3.15
204 No Content response when the Flask after_request hook receives no response, #83 by @mmdbalkhiadd mypy annotations and mark it as checkable, #76 by @orborde
One column per quarter.
add gzip to supported algorithms for streaming responses, but not in the COMPRESS_ALGORITHM_STREAMING default values, so users have to explicitly enab
gzip to supported algorithms for streaming responses, but not in the COMPRESS_ALGORITHM_STREAMING default values, so users have to explicitly enable itfix possible RuntimeError when applying compression to a streaming endpoint
RuntimeError when applying compression to a streaming endpointmake_conditional to streaming responses, as it had the effect of buffering the entire response, which defeats the purpose of streaming responses, unless the request.endpoint is in a new COMPRESS_STREAMING_ENDPOINT_CONDITIONAL config option, which defaults to ["static"]As serving static content with Flask is using streaming responses, we wanted to preserve the correct handling of conditional requests (i.e. 304 Not Modified responses) for static content, while avoiding buffering the entire response when compressing streaming responses for other endpoints
compressing *streaming* responses is now supported:
COMPRESS_STREAMS was True (the default), streaming responses were compressed in 1 sitting using response.get_data(), meaning streaming responses were compressed but not streamedCOMPRESS_STREAMS was False, streaming responses were not compressed at allCOMPRESS_STREAMS is True, streaming responses are compressed chunk-by-chunk using response.iter_encoded(), which means that streaming responses are compressed and streamedCOMPRESS_STREAMS is False, streaming responses are not compressed at all, as before.COMPRESS_ALGORITHM_STREAMING config option to specify the compression algorithm to use for streaming responses, which defaults to ["zstd", "br", "deflate"], as "gzip" is not suitable for streaming compression.the new COMPRESS_EVALUATE_CONDITIONAL_REQUEST config option is now True by default
COMPRESS_EVALUATE_CONDITIONAL_REQUEST config option is now True by defaultUse backports.zstd instead of pyzstd, #63 by @alexprengere
backports.zstd instead of pyzstd, #63 by @alexprengereCOMPRESS_EVALUATE_CONDITIONAL_REQUEST config option to call response.make_conditional(request) after compression, this ensures that 304 Not Modified responses are correctly generated when the client sends conditional requests with If-None-Match (defaults to False)Support, and test against, Python 3.14, see #61 by @kurtmckee
zstandard to pyzstd, which is now included in the Python 3.14 standard library, also part of #61flask_compress.DictCache() that is needed to configure Flask-Compress with caching, without relying on Flask-CachingAdd support for Python 3.13 in tox and classifiers
Drop support for Python 3.8 and lower, see #46
switch to using python-zstandard
add ZStandard compression
switch to using python-zstandard
Co-authored-by: Tristan Moreno tristan.moreno@orange.com
Add text/javascript mimetype. See #41
text/javascript mimetype. See #41Re-enable compression for streaming, but hide it behind a new option COMPRESS_STREAMS that defaults to True. See #36
COMPRESS_STREAMS that defaults to True. See #36Disable compression when response is streamed, see #31
When compression is enabled, *accept-encoding* is always added to the Vary header, fixes #28
Vary header, fixes #28Nothing published for this version
Automate the release process with GitHub Actions
setuptools_scm to manage package versionsAdd support for the identity value in *accept-encoding*, fixes #19
identity value in accept-encoding, fixes #19Support ETag header as defined in *RFC7232* #17
The following parameters to control Brotli compression are now available: #10
COMPRESS_BR_MODECOMPRESS_BR_LEVELCOMPRESS_BR_WINDOWCOMPRESS_BR_BLOCKCOMPRESS_DEFLATE_LEVEL to control compression level (default is -1) #84, which provides compression comparable to gzip at the default setting, while reducing the time required versus the Brotli default of 11Support for multiple compression algorithms and quality factors #7
gzip- Add Brotli support #1
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →