Debian Codegraph @

fastbencode.egg-info/PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: fastbencode
3 Version: 0.3.10
4 Summary: Implementation of bencode with optional fast Rust extensions
5 Maintainer-email: Breezy Developers <[email protected]>
6 License-Expression: Apache-2.0
7 Project-URL: Homepage, https://github.com/breezy-team/fastbencode
8 Project-URL: GitHub, https://github.com/breezy-team/fastbencode
9 Classifier: Programming Language :: Python :: 3.10
10 Classifier: Programming Language :: Python :: 3.11
11 Classifier: Programming Language :: Python :: 3.12
12 Classifier: Programming Language :: Python :: 3.13
13 Classifier: Programming Language :: Python :: 3.14
14 Classifier: Programming Language :: Python :: Implementation :: CPython
15 Classifier: Programming Language :: Python :: Implementation :: PyPy
16 Classifier: Operating System :: POSIX
17 Classifier: Operating System :: Microsoft :: Windows
18 Requires-Python: >=3.10
19 Description-Content-Type: text/markdown
20 License-File: COPYING
21 Provides-Extra: rust
22 Requires-Dist: setuptools-rust>=1.0.0; extra == "rust"
23 Provides-Extra: dev
24 Requires-Dist: ruff==0.15.6; extra == "dev"
25 Dynamic: license-file
26
27 fastbencode
28 ===========
29
30 fastbencode is an implementation of the bencode serialization format originally
31 used by BitTorrent.
32
33 The package includes both a pure-Python version and an optional Rust extension
34 based on PyO3. Both provide the same functionality, but the Rust extension
35 provides significantly better performance.
36
37 Example:
38
39 >>> from fastbencode import bencode, bdecode
40 >>> bencode([1, 2, b'a', {b'd': 3}])
41 b'li1ei2e1:ad1:di3eee'
42 >>> bdecode(bencode([1, 2, b'a', {b'd': 3}]))
43 [1, 2, b'a', {b'd': 3}]
44
45 The default ``bencode``/``bdecode`` functions just operate on
46 bytestrings. Use ``bencode_utf8`` / ``bdecode_utf8`` to
47 serialize/deserialize all plain strings as UTF-8 bytestrings.
48 Note that for performance reasons, all dictionary keys still have to be
49 bytestrings.
50
51 License
52 =======
53 fastbencode is available under the Apache License, version 2.
54
55 Copyright
56 =========
57
58 * Original Pure-Python bencoder © Petru Paler
59 * Split out from Bazaar/Breezy by Jelmer Vernooij
60 * Rust extension © Jelmer Vernooij