Bencode encoder and decoder written in python.
Project description
Bencode
Bencode encoder and decoder written in python.
Installation
pip install bencode-python
Usage
Decoder
Decoding bencode data.
from bencode.decoder import Decoder
decoder = Decoder()
decoded = decoder.decode(b"i42e")
print(decoded) # 42
Encoder
Encoding Python data types into bencode format.
from bencode.encoder import Encoder
encoder = Encoder()
encoded = encoder.encode(42)
print(encoded) # b'i42e'
License
Licensed under the MIT License.
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
bencode-python-0.0.1.tar.gz
(1.4 kB
view hashes)
Built Distribution
Close
Hashes for bencode_python-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 813026d0417c98cdf3b0bbb2700362116abfe70d3666e5c6a753e60149564d27 |
|
MD5 | d439ed88f9e10a40173096c248e5c541 |
|
BLAKE2b-256 | d7c945c1a122deb974ba75db04004e2daffa047e9e0e95306726f94769da2f69 |