Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: brotlicffi
3 Version: 1.2.0.1
4 Summary: Python CFFI bindings to the Brotli library
5 Home-page: https://github.com/python-hyper/brotlicffi
6 Author: Cory Benfield
7 Author-email: [email protected]
8 License: MIT
9 Classifier: Programming Language :: Python :: Implementation :: CPython
10 Classifier: Programming Language :: Python :: Implementation :: PyPy
11 Classifier: Programming Language :: Python :: 3
12 Classifier: Programming Language :: Python :: 3.8
13 Classifier: Programming Language :: Python :: 3.9
14 Classifier: Programming Language :: Python :: 3.10
15 Classifier: Programming Language :: Python :: 3.11
16 Classifier: Programming Language :: Python :: 3.12
17 Classifier: Programming Language :: Python :: 3.13
18 Classifier: Programming Language :: Python :: 3.14
19 Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
20 Requires-Python: >=3.8
21 License-File: LICENSE
22 Requires-Dist: cffi>=1.0.0; python_version < "3.13"
23 Requires-Dist: cffi>=1.17.0; python_version >= "3.13"
24 Dynamic: author
25 Dynamic: author-email
26 Dynamic: classifier
27 Dynamic: description
28 Dynamic: home-page
29 Dynamic: license
30 Dynamic: license-file
31 Dynamic: requires-dist
32 Dynamic: requires-python
33 Dynamic: summary
34
35 BrotliCFFI
36 ==========
37
38 .. image:: https://img.shields.io/pypi/v/brotlicffi
39 :alt: Version
40 :target: https://pypi.org/project/brotlicffi
41
42 .. image:: https://img.shields.io/conda/vn/conda-forge/brotlicffi
43 :alt: Version-Conda
44 :target: https://anaconda.org/conda-forge/brotlicffi
45
46 .. image:: https://pepy.tech/badge/brotlicffi
47 :alt: Downloads
48 :target: https://pepy.tech/project/brotlicffi
49
50 .. image:: https://img.shields.io/github/workflow/status/python-hyper/brotlicffi/CI/master
51 :alt: CI Status
52 :target: https://github.com/python-hyper/brotlicffi/actions
53
54 This library contains Python CFFI bindings for the reference Brotli encoder/decoder,
55 `available here`_. This allows Python software to use the Brotli compression
56 algorithm directly from Python code.
57
58 Install from PyPI:
59
60 .. code-block::
61
62 $ python -m pip install brotlicffi
63
64 Install from Conda:
65
66 .. code-block::
67
68 $ conda install -c conda-forge brotlicffi
69
70 To use it simply, try this:
71
72 .. code-block:: python
73
74 import brotlicffi
75 data = brotlicffi.decompress(compressed_data)
76
77 More information can be found `in the documentation`_.
78
79 .. _available here: https://github.com/google/brotli
80 .. _in the documentation: https://brotlipy.readthedocs.org
81
82 Using BrotliCFFI in Projects
83 ----------------------------
84
85 The API is 100% compatible with the `Brotli Python C bindings`_.
86 We recommend installing the C bindings on CPython and the CFFI
87 bindings everywhere else (PyPy, etc)
88
89 Essentially you use requirements like this:
90
91 .. code-block:: python
92
93 install_requires=[
94 "brotli; platform_python_implementation == 'CPython'",
95 "brotlicffi; platform_python_implementation != 'CPython'"
96 ]
97
98 and then import the correct Brotli library like so:
99
100 .. code-block:: python
101
102 try:
103 import brotlicffi as brotli
104 except ImportError:
105 import brotli
106
107 We provide an `example project`_ that shows how to use both
108 libraries together to support Brotli with multiple Python implementations.
109
110 .. _Brotli Python C bindings: https://pypi.org/project/Brotli
111 .. _example project: https://github.com/python-hyper/brotlipy/tree/master/example
112
113 License
114 -------
115
116 The source code of BrotliCFFI is available under the MIT license. Brotli itself
117 is made available under the Version 2.0 of the Apache Software License. See the
118 LICENSE and libbrotli/LICENSE files for more information.
119
120 Authors
121 -------
122
123 BrotliCFFI/brotlipy was authored by Cory Benfield and
124 is currently maintained by Seth Michael Larson.
125
126
127 Changelog
128 =========
129
130 1.2.0.1 (2025-03-05)
131 --------------------
132
133 - Added support for the free-threaded build of Python 3.14.
134 - Concurrent sharing of Compressor or Decompressor objects
135 now raises an exception.
136
137 1.2.0.0 (2025-11-21)
138 --------------------
139
140 - Upgraded libbrotli to v1.2.0.
141 - Added ``output_buffer_limit`` parameter to ``Decompressor.decompress()`` and
142 ``Decompressor.process()`` methods to allow mitigation of unexpectedly large
143 output. This addresses potential security concerns where maliciously crafted
144 compressed data could result in excessive memory usage during decompression.
145
146
147 1.1.0.0 (2023-09-14)
148 --------------------
149
150 - Upgraded libbrotli to v1.1.0
151 - Added explicit support for Python 3.10, 3.11, and 3.12
152 - Removed support for Python 2.7, 3.5, and 3.6
153
154
155 1.0.9.2 (2021-04-06)
156 --------------------
157
158 - Added ``manylinux_aarch64`` wheels
159
160
161 1.0.9.1 (2021-01-27)
162 --------------------
163
164 - Avoid byte/string comparison warning in error message construction
165
166
167 1.0.9.0 (2021-01-20)
168 --------------------
169
170 - Updated to v1.0.9 of the Brotli library
171 - Library version now follows Brotli version
172 - Removed the ``dictionary`` parameter from ``compress`` and ``Compressor``
173 - **NOTE:** Python 2.7 wheels for Windows likely won't work until
174 `google/brotli#848`_ is resolved
175
176 .. _google/brotli#848: https://github.com/google/brotli/issues/848
177
178 0.8.0 (2020-11-30)
179 ------------------
180
181 - Renamed the package on PyPI to ``brotlicffi``, all further updates will be
182 published to the new package. Using the ``brotlipy`` is deprecated.
183 - Changed the importable namespace from ``brotli`` to ``brotlicffi`` to no longer
184 conflict with the ``Brotli`` PyPI package.
185 - Added ``process()`` method to ``Compressor`` and ``Decompressor``.
186 - Added ``is_finished()`` method to ``Decompressor``.
187
188 0.7.0 (2017-05-30)
189 ------------------
190
191 - Update to v0.6.0 of the Brotli library.
192
193 0.6.0 (2016-09-08)
194 ------------------
195
196 - Resolved a bug where ``decompress()`` would return an empty bytestring
197 instead of erroring if the provided bytestring was small enough.
198 - Added the ``finish()`` method to the streaming decompressor.
199
200 0.5.1 (2016-08-17)
201 ------------------
202
203 - Update to v0.5.2 of the Brotli library.
204 - Add new exception type (``Error``).
205 - Add compatibility with C++ brotli library by aliasing ``Error`` to ``error``.
206 - Extra error checking of input parameters to the compressor.
207
208 0.5.0 (2016-08-16)
209 ------------------
210
211 - Update to v0.5.0 of the Brotli library.
212 - Extend one-shot compression API to include all control parameters.
213 - Added streaming/incremental compression API.
214 - Added flags to control compression mode.
215
216 0.4.0 (2016-08-01)
217 ------------------
218
219 Update to v0.4.0 of the Brotli library.
220
221 0.3.0 (2016-05-11)
222 ------------------
223
224 Update to v0.3.0 of the Brotli library.
225
226 0.2.0 (2015-10-05)
227 ------------------
228
229 Fix broken ``brotli.compress`` support on Windows.
230
231 0.1.3 (2015-10-05)
232 ------------------
233
234 - Added basic for ``brotli.compress`` through a C wrapper included in this
235 library.