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.0.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.0.0
File Size Uploaded Provenance Actions
bencode.py-2.0.0.tar.gz 7.3 kB Without provenance Details for bencode.py-2.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 13.7 kB

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

Download URL bencode.py-2.0.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
067cf936e29a7b698d2b4d00902343b78d434d73d837c33d6ca1a8be6038fe72
BLAKE2b-256 checksum
How to use checksums
efac06db2aeeda4ccc238bc6d7f17dae62d64c632b9a72ba8eb4e2c5fd56f7d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL bencode.py-2.0.0-py2.py3-none-any.whl
Size 6.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
58c515e4b81b1d45225d4a9e38ba4532acc94b9b7cf7be29bc5e62af3226a8f2
BLAKE2b-256 checksum
How to use checksums
1f09cda159542fe188706de49734e26522c360affe79f8dcf01e807f72cdfc7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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