bencode parser and converter
Project description
bencode
bencode-open is an open-source MIT-licensed library for parsing and converting
objects to and from Bencode format.
Rationale
bencode-open is MIT-licensed and can thus be included to almost all software,
compared to bencode and bencode.py.
Installation
bencode-open is available on GitHub
and on PyPI.
Installing bencode-open from PyPI is recommended and can be done as follows:
pip install bencode-open
Usage
import bencode_open
print(bencode_open.dumps(b"Hello?")) # Outputs b"6:Hello?"
print(bencode_open.dumps(17)) # Outputs b"i17e"
print(bencode_open.loads(b"6:Hello?")) # Outputs b"Hello?"
print(bencode_open.loads(b"i17e")) # Outputs 17
Running tests
python test.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bencode-open-1.2.tar.gz.
File metadata
- Download URL: bencode-open-1.2.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e822640d8c930624e6a263297fa34e6a5ade637a4cde0b3caba19d2f759044e6
|
|
| MD5 |
a34d581fcad96d28b8f92cd444ae709e
|
|
| BLAKE2b-256 |
0752511a5a1e93ccbffdb6c090dfcdf2e93f3dd206a78ea4f7984d38ec02844e
|
File details
Details for the file bencode_open-1.2-py3-none-any.whl.
File metadata
- Download URL: bencode_open-1.2-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81c61777b87abeea86111790b9dd7c117febcaf10028df1ac92cd77c2d889139
|
|
| MD5 |
d050747e11dedbdf201b8a0784af6ae9
|
|
| BLAKE2b-256 |
d45fa663f9463c0a3c4e115391b3183f2655bd33b39d6dfb03b3fbde70d06e47
|