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 details)
bencoder.pyx-1.1.0.tar.gz
(67.3 kB
view details)
Built Distributions
File details
Details for the file bencoder.pyx-1.1.0.zip
.
File metadata
- Download URL: bencoder.pyx-1.1.0.zip
- Upload date:
- Size: 71.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03d56d282175f0dd35055f4a9d7a8393b7e8fb6b3e7f8314a249b8a7b89fa3c5 |
|
MD5 | 7244c5ae5d08db9202ebb8fbdcdf421e |
|
BLAKE2b-256 | 760e6f24d69ac6164bba4389449c40ed0f9f373fac8d0284595d87a96bea3278 |
File details
Details for the file bencoder.pyx-1.1.0.tar.gz
.
File metadata
- Download URL: bencoder.pyx-1.1.0.tar.gz
- Upload date:
- Size: 67.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4af4b4e3042a2900520aa89776e66b68816c7c43f9c2b66c108fb942f509fe47 |
|
MD5 | 9f7cea598e01b52dc877a30583b066f9 |
|
BLAKE2b-256 | febff5b99acf9e28c0d05938546f184f9f75e1d62d2ece4535649b9bbc498818 |
File details
Details for the file bencoder.pyx-1.1.0-cp27-cp27mu-macosx_10_11_x86_64.whl
.
File metadata
- Download URL: bencoder.pyx-1.1.0-cp27-cp27mu-macosx_10_11_x86_64.whl
- Upload date:
- Size: 45.5 kB
- Tags: CPython 2.7mu, macOS 10.11+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 920aca2211a7334d594eae63fb170135eb3e26f70a001b0e5bbcadf95f451c8c |
|
MD5 | debdf78f1791bdfc0a52cc5532e796a2 |
|
BLAKE2b-256 | 7be1b3f310b76478366a85bfda37ab22594f30087619f7372b6d8b25e6a94517 |
File details
Details for the file bencoder.pyx-1.1.0-cp27-cp27m-macosx_10_4_x86_64.whl
.
File metadata
- Download URL: bencoder.pyx-1.1.0-cp27-cp27m-macosx_10_4_x86_64.whl
- Upload date:
- Size: 45.2 kB
- Tags: CPython 2.7m, macOS 10.4+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08364ab7ce9cf3f0ea252a910fab7f81fe3a2bb911e321180c3789ae6b76cb64 |
|
MD5 | 46c9665bdd57a238df2dd57e3f095a40 |
|
BLAKE2b-256 | ebb79885aba0f0c11d9a1f04e2ab2d127e3f0c324583fdb33b9cd385519411bb |