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.

bencode.bread(fd)

Read bencode formatted string from file or path fd.

bencode.bwrite(data, fd)

Write data as a bencode formatted string to file or path fd.

Metadata

Release files for bencode.py 2.1.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 2.1.0
File Size Uploaded Provenance Actions
bencode.py-2.1.0.tar.gz 17.1 kB Without provenance Details for bencode.py-2.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 31.9 kB

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

Download URL bencode.py-2.1.0.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7d65b02f174097a442a2b138208aee7fe104d2ce79e7a29fb457d0e02f38fc3d
BLAKE2b-256 checksum
How to use checksums
3dcff4c737f89a66c8156e0aec627d82cb25154d5444e4cceee236d33a0c6923
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.15

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

Download URL bencode.py-2.1.0-py2.py3-none-any.whl
Size 14.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f08cb93d4bdf7ad4da675082e530d53ba02fb26ffa8b19c54c095e442a0a6bed
BLAKE2b-256 checksum
How to use checksums
98d884d31b911a7cab865ec9070a982b9452b15db00373efcf1e4b4314a6a958
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.15

Security for bencode.py 2.1.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