Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bencode_rs-0.0.8.tar.gz (526.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

bencode_rs-0.0.8-cp310-abi3-win_amd64.whl (129.0 kB view details)

Uploaded CPython 3.10+Windows x86-64

bencode_rs-0.0.8-cp310-abi3-musllinux_1_2_x86_64.whl (482.4 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

bencode_rs-0.0.8-cp310-abi3-musllinux_1_2_aarch64.whl (455.8 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (278.2 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (300.8 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ s390x

bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (401.5 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ppc64le

bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (283.8 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARMv7l

bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (271.6 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

bencode_rs-0.0.8-cp310-abi3-macosx_11_0_arm64.whl (242.7 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file bencode_rs-0.0.8.tar.gz.

File metadata

  • Download URL: bencode_rs-0.0.8.tar.gz
  • Upload date:
  • Size: 526.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bencode_rs-0.0.8.tar.gz
Algorithm Hash digest
SHA256 25e57aaff297995339d2a380724ad84d56875fffb69ca93e57f383ee67918e39
MD5 99541c8c62c9377cf5fec57c23845db9
BLAKE2b-256 cba1975562c964ec408fc8e8b75e299adefd336d30997400e42b1149cfd484a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.8.tar.gz:

Publisher: release.yaml on trim21/bencode-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bencode_rs-0.0.8-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: bencode_rs-0.0.8-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 129.0 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bencode_rs-0.0.8-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8c98f5c73afe44d14daec7cfb93322a576e6b972dfc055aa9176e5ff4d603576
MD5 1b2be5e90018f25878b678b9b69de853
BLAKE2b-256 5c06bbe86cb86cfca6b102083e1e41d137cae20823ed1fcde4742e290039fe6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.8-cp310-abi3-win_amd64.whl:

Publisher: release.yaml on trim21/bencode-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bencode_rs-0.0.8-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.8-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fa3331591b7e92c8dea8bf249e4d0ef3cae34069ec85bdf554234a1a5228bb9f
MD5 26f3da8f8ac0da7dd7a4366fd9fe51eb
BLAKE2b-256 067962fb410966df6578d7d74f351361ae280b8ef01c3cce8b1387d06e068907

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.8-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yaml on trim21/bencode-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bencode_rs-0.0.8-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.8-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 9416a10cb15f0d68c87965fabd1852166be4ade24d351f9a17dbc31d99693bad
MD5 ee47d1af896fb12ce029c3a29dbc3d9d
BLAKE2b-256 09c0dc6665719cf916afea24d929e54d704d86bc188bcf03e4464ea1fca126b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.8-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yaml on trim21/bencode-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c353f7c0519cac7c262e83e02acc59322c669e40687cbc58b66c31878893e29a
MD5 69e0adb905160ad6358657970e4fb934
BLAKE2b-256 6b7e58fffc588c42d5c269bbdba2bb76f2e42ceb66dcd212f843512000b8fce7

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yaml on trim21/bencode-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 f4bb1914fd4af990d77f160a951180b2ee5cf71ed0c57df89e1b355676436a9b
MD5 f0a8a369df55e6ee29dc01609bad33bf
BLAKE2b-256 80d47bc5b104f014018e3693b045710c6349267e267b52a587974ba22b7075b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl:

Publisher: release.yaml on trim21/bencode-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 ecdbccc235132681c89ed4529f37750f512d7ef2c63bdefdf4b9202580c95cc2
MD5 6d2bd887927e8a0651576227151450e3
BLAKE2b-256 1c29ea9abe873a1cc9b37d6c110561eab750d898958cf3adcfaf61c0fee83178

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl:

Publisher: release.yaml on trim21/bencode-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 de5e5485460f9fd062b364f7396aee1c4c29270fd184f62109cdf824b976b9ae
MD5 7336c8cc2b78898e9366bfbd557f74c7
BLAKE2b-256 23d6e78e506fda7b6d26d3047398a7732732f708122e9cb43a62d13ae6d54540

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl:

Publisher: release.yaml on trim21/bencode-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d24965c5757db72672c78fb3466ac1d0abba21c340c16d6f7bb2e11239f4dc2a
MD5 750041ec790ddddd7a2ba0718e860930
BLAKE2b-256 3bd664101a1ae7a5ff2822e7b95bb655eb5b92f5fbc5c6f31c4b99e2d4d88d0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yaml on trim21/bencode-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bencode_rs-0.0.8-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.8-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 593320e5f2ddf30f908f81a87f1b7a4f1327dacaf3beb4ca0f10b8966c75271e
MD5 5f6e1aa8428782ff45ea170b7814cfce
BLAKE2b-256 c47b760e432eed9c6305896785c1945e787f93ec2a9500e3bc4d2e5cbefb21a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.8-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yaml on trim21/bencode-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page