Skip to main content

bencode.py

https://img.shields.io/pypi/v/bencode.py.svg?style=flat-square https://img.shields.io/travis/fuzeman/bencode.py.svg?style=flat-square https://img.shields.io/coveralls/fuzeman/bencode.py/master.svg?style=flat-square

Simple bencode parser (for Python 2, Python 3 and PyPy), forked from the bencode package by Thomas Rampelberg.

Usage

Encode:

import bencode

bencode.encode({'title': 'Example'})
# 'd5:title7:Examplee'

bencode.encode(12)
# 'i12e'

Decode:

import bencode

bencode.decode('d5:title7:Examplee')
# {'title': 'Example'}

bencode.decode('i12e')
# 12

API

bencode.bencode(value)

bencode.encode(value)

Encode value into the bencode format.

bencode.bdecode(value)

bencode.decode(value)

Decode bencode formatted string value.

Metadata

Release files for bencode.py 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bencode.py 1.2.0
File Size Uploaded Provenance Actions
bencode.py-1.2.0.tar.gz 5.5 kB Without provenance Details for bencode.py-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bencode.py 1.2.0
File Interpreter ABI Platform Actions
bencode.py-1.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for bencode.py-1.2.0-py2.py3-none-any.whl

Total release size: 10.6 kB

Release files / bencode.py-1.2.0.tar.gz

Download URL bencode.py-1.2.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
65efa44fef2172cc54587bb04c7f703d1471f7443e07bf3da76f6f9090269018
BLAKE2b-256 checksum
How to use checksums
59fbaa4ad360601acdb6f669b4d2260562d919945ae541ab716d685dcb42b9f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / bencode.py-1.2.0-py2.py3-none-any.whl

Download URL bencode.py-1.2.0-py2.py3-none-any.whl
Size 5.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
133e74efe4f9bdab7e4e39bd42204096e268952a90fdf43c97198f0cf5cc5a0a
BLAKE2b-256 checksum
How to use checksums
9cc914a2fe2ce1acc458d390af16cf53f1b669230581093bba553f4bc855a617
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for bencode.py 1.2.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page