Yet another bencode implementation in Cython
Project description
A fast bencode implementation in Cython supports both Python2 & Python3 .
Install
pip install bencoder.pyx
Usage
from bencoder import bencode, bdecode
assert bencode("WWWWWW") == b'6:WWWWWW'
assert bencode(233) == b'i233e'
with open("debian-8.3.0-amd64-netinst.iso.torrent", "rb") as f:
torrent = bdecode(f.read())
print(torrent['announce'])
ChangeLog
Version 1.1.0
Use OrderedDict instaed of dict
Support encoding subclasses of dict
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 Distributions
bencoder.pyx-1.1.0.zip
(71.5 kB
view hashes)
bencoder.pyx-1.1.0.tar.gz
(67.3 kB
view hashes)
Built Distributions
Close
Hashes for bencoder.pyx-1.1.0-cp27-cp27mu-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 920aca2211a7334d594eae63fb170135eb3e26f70a001b0e5bbcadf95f451c8c |
|
MD5 | debdf78f1791bdfc0a52cc5532e796a2 |
|
BLAKE2b-256 | 7be1b3f310b76478366a85bfda37ab22594f30087619f7372b6d8b25e6a94517 |
Close
Hashes for bencoder.pyx-1.1.0-cp27-cp27m-macosx_10_4_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08364ab7ce9cf3f0ea252a910fab7f81fe3a2bb911e321180c3789ae6b76cb64 |
|
MD5 | 46c9665bdd57a238df2dd57e3f095a40 |
|
BLAKE2b-256 | ebb79885aba0f0c11d9a1f04e2ab2d127e3f0c324583fdb33b9cd385519411bb |