Bencodex reader/writer for Python
This package implements Bencodex serialization format which extends Bencoding.
Usage
This package’s API follows the tradition of Python’s pickle and json modules:
bencodex.dump(obj: bencodex.BValue, fileobj: typing.BinaryIO) -> None
bencodex.dumps(obj: bencodex.BValue) -> bytes
bencodex.load(fileobj: typing.BinaryIO) -> bencodex.BValue
bencodex.loads(encoded: bytes) -> bencodex.BValue
Examples
>>> from bencodex import dumps, loads
>>> dumps({'name': 'Jane Doe', 'age': 30, 'nationality': ['BR', 'US']})
b'du3:agei30eu4:nameu8:Jane Doeu11:nationalitylu2:BRu2:USee'
>>> loads(_)
{'age': 30, 'name': 'Jane Doe', 'nationality': ['BR', 'US']}
License
Distributed under GPLv3 or later.
Metadata
Release files for bencodex 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bencodex-1.0.1.tar.gz | 8.7 kB | Without provenance | Details for bencodex-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bencodex-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for bencodex-1.0.1-py3-none-any.whl |
Total release size: 24.8 kB
Release files / bencodex-1.0.1.tar.gz
| Download URL | bencodex-1.0.1.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a15c9f1cd3ca6c0b012bd03c1c936fadfa4c24ce476a6582e0ef91298d045547
|
|
BLAKE2b-256 checksum How to use checksums |
484de6d8eccbb4aeedc69f7c2ea07f2debf62a0d06837f4dc6efe12f69192722
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Release files / bencodex-1.0.1-py3-none-any.whl
| Download URL | bencodex-1.0.1-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d16764f1621eaaf06258abc167bcecd2f762be7e1e4958f7e715784ae3da59b
|
|
BLAKE2b-256 checksum How to use checksums |
885cc72be7960a95129d3f2d8c4f0f039f9acd528179c986a8b65fc6f150e6e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Security for bencodex 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.