Skip to main content

Yet another bencode implementation in Cython

Project description

A fast bencode implementation in Cython supports both Python2 & Python3 .

https://travis-ci.org/whtsky/bencoder.pyx.svg?branch=master

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'])

Project details


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.0.0.zip (32.0 kB view hashes)

Uploaded Source

bencoder.pyx-1.0.0.tar.gz (27.5 kB view hashes)

Uploaded Source

Built Distributions

bencoder.pyx-1.0.0.win-amd64-py3.5.exe (168.3 kB view hashes)

Uploaded Source

bencoder.pyx-1.0.0.win-amd64-py3.4.exe (253.6 kB view hashes)

Uploaded Source

bencoder.pyx-1.0.0.win-amd64-py3.3.exe (253.5 kB view hashes)

Uploaded Source

bencoder.pyx-1.0.0.win-amd64-py2.7.exe (255.3 kB view hashes)

Uploaded Source

bencoder.pyx-1.0.0.win-amd64-py2.6.exe (255.6 kB view hashes)

Uploaded Source

bencoder.pyx-1.0.0.win32-py3.5.exe (157.1 kB view hashes)

Uploaded Source

bencoder.pyx-1.0.0.win32-py3.4.exe (219.9 kB view hashes)

Uploaded Source

bencoder.pyx-1.0.0.win32-py3.3.exe (219.8 kB view hashes)

Uploaded Source

bencoder.pyx-1.0.0.win32-py2.7.exe (224.8 kB view hashes)

Uploaded Source

bencoder.pyx-1.0.0.win32-py2.6.exe (224.7 kB view hashes)

Uploaded Source

bencoder.pyx-1.0.0-cp35-none-win_amd64.whl (31.9 kB view hashes)

Uploaded CPython 3.5 Windows x86-64

bencoder.pyx-1.0.0-cp35-none-win32.whl (27.8 kB view hashes)

Uploaded CPython 3.5 Windows x86

bencoder.pyx-1.0.0-cp34-none-win_amd64.whl (31.1 kB view hashes)

Uploaded CPython 3.4 Windows x86-64

bencoder.pyx-1.0.0-cp34-none-win32.whl (28.6 kB view hashes)

Uploaded CPython 3.4 Windows x86

bencoder.pyx-1.0.0-cp33-none-win_amd64.whl (31.1 kB view hashes)

Uploaded CPython 3.3 Windows x86-64

bencoder.pyx-1.0.0-cp33-none-win32.whl (28.6 kB view hashes)

Uploaded CPython 3.3 Windows x86

bencoder.pyx-1.0.0-cp27-none-win_amd64.whl (31.3 kB view hashes)

Uploaded CPython 2.7 Windows x86-64

bencoder.pyx-1.0.0-cp27-none-win32.whl (28.4 kB view hashes)

Uploaded CPython 2.7 Windows x86

bencoder.pyx-1.0.0-cp27-none-macosx_10_4_x86_64.whl (36.8 kB view hashes)

Uploaded CPython 2.7 macOS 10.4+ x86-64

bencoder.pyx-1.0.0-cp26-none-win_amd64.whl (31.6 kB view hashes)

Uploaded CPython 2.6 Windows x86-64

bencoder.pyx-1.0.0-cp26-none-win32.whl (28.4 kB view hashes)

Uploaded CPython 2.6 Windows x86

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page