a bencode parser build with pyo3
Project description
A bencode serialize/deserialize library written in Rust with pyo3
install
pip install bencode-rs
basic usage
import bencode_rs
assert bencode_rs.bdecode(b"d4:spaml1:a1:bee") == {b"spam": [b"a", b"b"]}
assert bencode_rs.bencode({'hello': 'world'}) == b'd5:hello5:worlde'
Notice
decoding
there is no str/string in bencode, only bytes. so we decode bencode bytes to python bytes, since it may not be a utf8 string.
encoding
we encode python True
as int 1
and False
as int 0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file bencode_rs-0.0.5.tar.gz
.
File metadata
- Download URL: bencode_rs-0.0.5.tar.gz
- Upload date:
- Size: 395.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb5c442b86a5432f761bfb55954c4b351bef8e1276d35010718002dfa9345932 |
|
MD5 | 895ce763a483bc01227dc8e3f3da13c9 |
|
BLAKE2b-256 | 6c48a18ab12d0d83273866edeb1bda5f448b60a71c47068925c1fb84bae849b3 |
Provenance
The following attestation bundles were made for bencode_rs-0.0.5.tar.gz
:
Publisher:
release.yaml
on trim21/bencode-rs
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bencode_rs-0.0.5.tar.gz
- Subject digest:
eb5c442b86a5432f761bfb55954c4b351bef8e1276d35010718002dfa9345932
- Sigstore transparency entry: 145473167
- Sigstore integration time:
- Predicate type:
File details
Details for the file bencode_rs-0.0.5-cp39-abi3-win_amd64.whl
.
File metadata
- Download URL: bencode_rs-0.0.5-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 125.2 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31c5b16d401b4e09a8aee516617229bc28dc14f7780a1166c636a8eccc987136 |
|
MD5 | 3d32d563fbf892e838d22fcc1bcd318f |
|
BLAKE2b-256 | d5893cf687af9a5588a7ffdc61b8413e09b8672188211b69095a7da78a994a7a |
Provenance
The following attestation bundles were made for bencode_rs-0.0.5-cp39-abi3-win_amd64.whl
:
Publisher:
release.yaml
on trim21/bencode-rs
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bencode_rs-0.0.5-cp39-abi3-win_amd64.whl
- Subject digest:
31c5b16d401b4e09a8aee516617229bc28dc14f7780a1166c636a8eccc987136
- Sigstore transparency entry: 145473173
- Sigstore integration time:
- Predicate type:
File details
Details for the file bencode_rs-0.0.5-cp39-abi3-win32.whl
.
File metadata
- Download URL: bencode_rs-0.0.5-cp39-abi3-win32.whl
- Upload date:
- Size: 119.3 kB
- Tags: CPython 3.9+, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1cef42fe59fc96f1ff7b11bcf7fb0cb7020c1d19f3099d160addc129fc1fa6d |
|
MD5 | a0b9b024859c827c57e84d2876063b15 |
|
BLAKE2b-256 | dc68075cf9fbca94993509556a9544dc6ba28ddb150f35c5d92e467960474e81 |
Provenance
The following attestation bundles were made for bencode_rs-0.0.5-cp39-abi3-win32.whl
:
Publisher:
release.yaml
on trim21/bencode-rs
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bencode_rs-0.0.5-cp39-abi3-win32.whl
- Subject digest:
a1cef42fe59fc96f1ff7b11bcf7fb0cb7020c1d19f3099d160addc129fc1fa6d
- Sigstore transparency entry: 145473172
- Sigstore integration time:
- Predicate type:
File details
Details for the file bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 257.9 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d36ef3619ed65b5ec7f96dd606c4ae7f8e28b4db86e149cb175e5873530f2993 |
|
MD5 | 58fbfe469fa90af41efa52957087048b |
|
BLAKE2b-256 | 4021ec249c37832b8348ceedfaf307a65017ba577e646f7581b01cd3ebcb7718 |
Provenance
The following attestation bundles were made for bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
:
Publisher:
release.yaml
on trim21/bencode-rs
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bencode_rs-0.0.5-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Subject digest:
d36ef3619ed65b5ec7f96dd606c4ae7f8e28b4db86e149cb175e5873530f2993
- Sigstore transparency entry: 145473178
- Sigstore integration time:
- Predicate type:
File details
Details for the file bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
- Download URL: bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 295.9 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee2cd697ff975e5243c69c1f23ec08cd467981ecfbad2260216424c5797dee9d |
|
MD5 | 4a3ebf4202025ae439497cbd74c60954 |
|
BLAKE2b-256 | b1a63626240f7b49eee5db937c7a3f320cdba1bafb5bf41c706671d4c0a54205 |
Provenance
The following attestation bundles were made for bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
:
Publisher:
release.yaml
on trim21/bencode-rs
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bencode_rs-0.0.5-cp39-abi3-manylinux2014_s390x.manylinux_2_17_s390x.whl
- Subject digest:
ee2cd697ff975e5243c69c1f23ec08cd467981ecfbad2260216424c5797dee9d
- Sigstore transparency entry: 145473176
- Sigstore integration time:
- Predicate type:
File details
Details for the file bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
.
File metadata
- Download URL: bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 301.1 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4c20a6c25bf6b40f04ed1c2ef2f395d905b7a0f5c92e1f8d8241b9358c4e430 |
|
MD5 | 87f9a9e85be6fe012b3140ffa55ae285 |
|
BLAKE2b-256 | 7cb5f41891236fd25badc4bad536f246b0e6be50922ff041863eca1632b70434 |
Provenance
The following attestation bundles were made for bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
:
Publisher:
release.yaml
on trim21/bencode-rs
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bencode_rs-0.0.5-cp39-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl
- Subject digest:
f4c20a6c25bf6b40f04ed1c2ef2f395d905b7a0f5c92e1f8d8241b9358c4e430
- Sigstore transparency entry: 145473177
- Sigstore integration time:
- Predicate type:
File details
Details for the file bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 263.7 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 358e40c2425990922894ad4100bfb0efa76e77003af5d4aeb96be621bccb95bc |
|
MD5 | dcda7833b7f37252cd2a962d5ecc943f |
|
BLAKE2b-256 | 642736099031c0b35291e882a1cacc59a4e64ccab2699fc0e2ad4a445fcbc51e |
Provenance
The following attestation bundles were made for bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
:
Publisher:
release.yaml
on trim21/bencode-rs
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bencode_rs-0.0.5-cp39-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.whl
- Subject digest:
358e40c2425990922894ad4100bfb0efa76e77003af5d4aeb96be621bccb95bc
- Sigstore transparency entry: 145473169
- Sigstore integration time:
- Predicate type:
File details
Details for the file bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 256.4 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a92d143193dcd998e9158812e5c0a359814ce7fdb44b3697edf5411a77bb039 |
|
MD5 | 4375458b64146ecdb0beb54c29e93da8 |
|
BLAKE2b-256 | 1511d9b5e1f986e368d437befb3796dc28c9179420b55fc509e3be6a4b3dd425 |
Provenance
The following attestation bundles were made for bencode_rs-0.0.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
:
Publisher:
release.yaml
on trim21/bencode-rs
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bencode_rs-0.0.5-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
- Subject digest:
4a92d143193dcd998e9158812e5c0a359814ce7fdb44b3697edf5411a77bb039
- Sigstore transparency entry: 145473181
- Sigstore integration time:
- Predicate type:
File details
Details for the file bencode_rs-0.0.5-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl
.
File metadata
- Download URL: bencode_rs-0.0.5-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 273.4 kB
- Tags: CPython 3.9+, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da757c346ce07bfb87fb69e8900f92b43981d8ffe24bde5b189735f4efb31a3c |
|
MD5 | 8e8b1f93fe8a08d4e8d12ec009f3e518 |
|
BLAKE2b-256 | 1e924e9fa24833bb3f22b63744234f0af3b17685f30423315f4a12774881de2b |
Provenance
The following attestation bundles were made for bencode_rs-0.0.5-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl
:
Publisher:
release.yaml
on trim21/bencode-rs
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bencode_rs-0.0.5-cp39-abi3-manylinux1_i686.manylinux_2_5_i686.whl
- Subject digest:
da757c346ce07bfb87fb69e8900f92b43981d8ffe24bde5b189735f4efb31a3c
- Sigstore transparency entry: 145473175
- Sigstore integration time:
- Predicate type:
File details
Details for the file bencode_rs-0.0.5-cp39-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: bencode_rs-0.0.5-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 224.0 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59b5c833d63d6035c6139581df4d813c4b5dd801fdc905df12975012cc049c8e |
|
MD5 | f81312bfa4e9f0740f538f1a5add7e60 |
|
BLAKE2b-256 | a02c25b3ed99c9e14fa83966b4f18b85397fbf7265d9728811c7b48cb2a7cb80 |
Provenance
The following attestation bundles were made for bencode_rs-0.0.5-cp39-abi3-macosx_11_0_arm64.whl
:
Publisher:
release.yaml
on trim21/bencode-rs
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bencode_rs-0.0.5-cp39-abi3-macosx_11_0_arm64.whl
- Subject digest:
59b5c833d63d6035c6139581df4d813c4b5dd801fdc905df12975012cc049c8e
- Sigstore transparency entry: 145473180
- Sigstore integration time:
- Predicate type:
File details
Details for the file bencode_rs-0.0.5-cp39-abi3-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: bencode_rs-0.0.5-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 227.4 kB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88458921dc208c2f947ce9645e7aa0f543ef079a5b4ae307634403e3fa50bac8 |
|
MD5 | 377472fe43768c7fd9f510082656a59f |
|
BLAKE2b-256 | b07539f0aa06f1e68057ebc377eb5c25157692563e987ab93fc09469611a8a30 |
Provenance
The following attestation bundles were made for bencode_rs-0.0.5-cp39-abi3-macosx_10_12_x86_64.whl
:
Publisher:
release.yaml
on trim21/bencode-rs
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bencode_rs-0.0.5-cp39-abi3-macosx_10_12_x86_64.whl
- Subject digest:
88458921dc208c2f947ce9645e7aa0f543ef079a5b4ae307634403e3fa50bac8
- Sigstore transparency entry: 145473171
- Sigstore integration time:
- Predicate type: