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.2.tar.gz
(1.4 kB
view hashes)
Built Distribution
Close
Hashes for bencode_python-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a982caa29e4ca4a210fc1567926d44292d1dfdf6874f23d336f7f393ebe686a6 |
|
MD5 | 6161ada17fcccc3fc88d57e28386645a |
|
BLAKE2b-256 | 00c6fbb8dc34f2904db7bd59daffa673275d7434f2762bdfb784479f0d8449e1 |