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.9.tar.gz (529.2 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.9-cp311-abi3-win_amd64.whl (132.3 kB view details)

Uploaded CPython 3.11+Windows x86-64

bencode_rs-0.0.9-cp311-abi3-musllinux_1_2_x86_64.whl (479.6 kB view details)

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

bencode_rs-0.0.9-cp311-abi3-musllinux_1_2_aarch64.whl (449.1 kB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

bencode_rs-0.0.9-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (276.1 kB view details)

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

bencode_rs-0.0.9-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (296.1 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ s390x

bencode_rs-0.0.9-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (387.9 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ppc64le

bencode_rs-0.0.9-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (278.8 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARMv7l

bencode_rs-0.0.9-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (271.2 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

bencode_rs-0.0.9-cp311-abi3-macosx_11_0_arm64.whl (239.2 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

bencode_rs-0.0.9-cp310-cp310-win_amd64.whl (132.0 kB view details)

Uploaded CPython 3.10Windows x86-64

bencode_rs-0.0.9-cp310-cp310-musllinux_1_2_x86_64.whl (478.5 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

bencode_rs-0.0.9-cp310-cp310-musllinux_1_2_aarch64.whl (448.2 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ ARM64

bencode_rs-0.0.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (274.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

bencode_rs-0.0.9-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl (294.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ s390x

bencode_rs-0.0.9-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (384.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ppc64le

bencode_rs-0.0.9-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (277.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARMv7l

bencode_rs-0.0.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (270.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

bencode_rs-0.0.9-cp310-cp310-macosx_11_0_arm64.whl (239.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for bencode_rs-0.0.9.tar.gz
Algorithm Hash digest
SHA256 8b19490674c5abdc5c7d329071a43760d55313386791ffacb779a9c489c6c6c9
MD5 3d8b65e2845c7d6bbddf1514eca124e0
BLAKE2b-256 56053cd84a089a92e62f63bbdec21c87904b5b527432d67d2ed0200785e32f81

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9.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.9-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: bencode_rs-0.0.9-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 132.3 kB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for bencode_rs-0.0.9-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3ee4ac64f732148f89a570ec2267a595bb83b52636411c7cc91fa6ecfc85f1db
MD5 ce6f1f9004fb0ad1544465b75de3c41a
BLAKE2b-256 77b585ae9e584009e571606344daad438ffc881ad4693fafdcd33e2d35dca4d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp311-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.9-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 813570de66741ee856e7745bd344fd2d5656da377431f9c73c4d645aab0a2534
MD5 439b4cb5fcd027dfb9b761b72f57cb40
BLAKE2b-256 67eb1e5f1907590d2fdcdd23af5be3b916f20f0d65f631b22549f62584f31447

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp311-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.9-cp311-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 a9e549ada7aa64858a71b9b6befc50a6c4d34a22cdec53206d701964488f25a5
MD5 074f279d2920245afcb28f8a9cee2f8c
BLAKE2b-256 fc07bbeb40b8fcdae51018cc37ec5c48da55d38c156a81b1219291bc0559e76c

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp311-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.9-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7839cb560774ae03de4dfd856f7803a29fe4386f812a7b8ce9c4f3d4c8d6a037
MD5 96bb6e5757c042e640af9ad1895b6c29
BLAKE2b-256 d10aac79428670300ca1e37fa9452e5bbf2c7add0de4948528983e50e522ba51

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp311-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.9-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 9203fb1baf5bc0e05ab7b587c6da2a5d5cb58ffe3c38d49b6419da4735945771
MD5 d27925beee4bb5ee74f3400c6201e22b
BLAKE2b-256 970cbb783ae7d6cbb7a3723c4b99cea9c258217060f7db2a3c2f8f0b9f805f49

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp311-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.9-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 0348991d23815147443b83c09b136613cd28ca51210bf59f233e349d745e697f
MD5 b4028c49fe7f28f6b1bbe6d6bc383275
BLAKE2b-256 88b5a67207cbeabc5e2891519bfd5581fcf1cb69d8067c31bf65492b73ff71d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp311-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.9-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 1dd8c09cbe610471a524f70cc2bc5d644c7c2d929226bcb023877be051dac1ce
MD5 3bfc060d6e6bead115a7646879b133b5
BLAKE2b-256 d0e92c31f3a0f400d3f5a9d02e5192838be674c19298d3b6562325a4d3b5b0c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp311-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.9-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0e448982239d85f8447a18bf89c6063141187fd930f8baa57958eee819a897b5
MD5 04e38f5e05ffff7f0990458d94a98b05
BLAKE2b-256 01fb413d5d24fabfdf566b500a219113ed0533c961172ff321e2ca77a0f0610c

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp311-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.9-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f6407b75796846ded4ab91498eed54ed229b0950afe3cb974553bc63441a7d20
MD5 b5606dd3608d292848ba192bf47e208f
BLAKE2b-256 9e36c8de37e1bd8db292d4b34dc26a71bedabf6f31fccbc6eb5645d76a953f47

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp311-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.

File details

Details for the file bencode_rs-0.0.9-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: bencode_rs-0.0.9-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 132.0 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for bencode_rs-0.0.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4522d427ecc366f9eef0c96a96d75a8ef6f5c60ac4e4b853f370a60487a2b4f0
MD5 23768a5b21ccdb103e67d1016ed4436f
BLAKE2b-256 30e0a06a40ba32ef3b5f9363f6426a5778aba1f9fa7e5709c1fe3d13f0efc1a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp310-cp310-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.9-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 30fefb70567b5449ba89fec1306afc80624078e6a3bd31d8e1315d4dbd86ed2d
MD5 73128d6b1b1491e4f9d53fb8a19dfc3d
BLAKE2b-256 050ade451a4bae8e3709dc41c2853df4df9b78f78f475734b5e1d8d3e3bd00ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp310-cp310-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.9-cp310-cp310-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 fe1cd99c61647a54721828dd1bc6e1a73f20795e041243484ca2fce0542b9b3c
MD5 279c8eb7d553b63ba4849bf4ace709b7
BLAKE2b-256 0d99db0cabb20537f6ca8ceace93fac99968d0a2a116bb64a8c07880aff5ce5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp310-cp310-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.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b3fd3a48220ff215640ee55782f13aba77f9a13d2fa8332f4e8d58884bf171fb
MD5 2d1d4e81ed7f5ca020a73f102f599ae5
BLAKE2b-256 1240d9697c86024e6d408dd28706b5845a6ab316043ace5e83e084b03d7c2415

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp310-cp310-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.9-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 c1e01173aa567496fd2bc38b08b2572f91d193301ab64f88bafd9f26607cfd95
MD5 44985429e85dc53add6f39d0a6a8ceff
BLAKE2b-256 6e878a28206a779ed26d37eb1abb9b304fa4453dcabd9d447c5e4c502ec3c64e

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp310-cp310-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.9-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 0268a3f0e22374c7131f5e9b924bf0297983e3042f70fcc0d4f35977d9a44d14
MD5 a0a13b6b7c6a881525558cf2e82fe75a
BLAKE2b-256 a5856c8a27824b347c8ed55c24bb25ff4671fe846ee2059bac8f1174466a9e86

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp310-cp310-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.9-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 cfa5cd619e14f5317a3a0055f41aa4d790ef7d749522ee32121fb5832f476c79
MD5 e6f5618fa02fef1fb15e69b509ce9e9e
BLAKE2b-256 a5db9caf9a3d14291b0ecf4321e7806acf57b0819b5d1a43aeefaca569664716

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp310-cp310-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.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0ca166144c610b4f41da36f74e752b7ca603941c1c548df478d431c780118d73
MD5 ed9d7f6934adbb7ac1922189df0448f8
BLAKE2b-256 fb98d56d98e8fdc16a5bd9e5a3e09099c8c04bd75d59c7c8565a2e70020fe1e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp310-cp310-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.9-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bencode_rs-0.0.9-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 748831cdd450820bcaab3ae840d124a53656603725cd442ce0c12e5ea4096def
MD5 71c7ff12c7ba8a450f7f76c43b701499
BLAKE2b-256 c97509cc1fa8b7dd5ec4af24c685dbe238934311f17ff283c67438a586826615

See more details on using hashes here.

Provenance

The following attestation bundles were made for bencode_rs-0.0.9-cp310-cp310-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