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 details)
Built Distribution
File details
Details for the file bencode-python-0.0.2.tar.gz
.
File metadata
- Download URL: bencode-python-0.0.2.tar.gz
- Upload date:
- Size: 1.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 489dc478ced90da4b26ec96a6d1743477dd42ff8e658335da611483c0dcf7f1e |
|
MD5 | d760a60c47dab75f65070a8fd963c88c |
|
BLAKE2b-256 | 34eb6c0320e1327915c2ab1ac8a4e6d98df6de4a7368dc17acf2fb738d73f000 |
File details
Details for the file bencode_python-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: bencode_python-0.0.2-py3-none-any.whl
- Upload date:
- Size: 1.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a982caa29e4ca4a210fc1567926d44292d1dfdf6874f23d336f7f393ebe686a6 |
|
MD5 | 6161ada17fcccc3fc88d57e28386645a |
|
BLAKE2b-256 | 00c6fbb8dc34f2904db7bd59daffa673275d7434f2762bdfb784479f0d8449e1 |