Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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, bdecode2

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

decoded, length = bdecode2(b'6:WWWWWWi233e')
assert decoded == b'WWWWWW'
assert length == 8

ChangeLog

Version 1.2.0

  • Add bdecode2 method. #6

Version 1.1.3

  • Performance Improvement
  • Fix package metainfo #3

Version 1.1.2

  • Support encode large int

Version 1.1.0

  • Use OrderedDict instaed of dict
  • Support encoding subclasses of dict
Release History

Release History

This version
History Node

1.2.0

History Node

1.1.3

History Node

1.1.2

History Node

1.1.1

History Node

1.1.0

History Node

1.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
bencoder.pyx-1.2.0-cp26-cp26m-manylinux1_i686.whl (155.5 kB) Copy SHA256 Checksum SHA256 cp26 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp26-cp26m-manylinux1_x86_64.whl (169.4 kB) Copy SHA256 Checksum SHA256 cp26 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp26-cp26mu-manylinux1_i686.whl (155.4 kB) Copy SHA256 Checksum SHA256 cp26 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp26-cp26mu-manylinux1_x86_64.whl (170.0 kB) Copy SHA256 Checksum SHA256 cp26 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp26-cp26m-win32.whl (36.9 kB) Copy SHA256 Checksum SHA256 cp26 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp26-cp26m-win_amd64.whl (42.5 kB) Copy SHA256 Checksum SHA256 cp26 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (96.5 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp27-cp27m-manylinux1_i686.whl (157.6 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp27-cp27m-manylinux1_x86_64.whl (170.9 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp27-cp27mu-manylinux1_i686.whl (157.6 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp27-cp27mu-manylinux1_x86_64.whl (171.4 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp27-cp27m-win32.whl (36.6 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp27-cp27m-win_amd64.whl (42.1 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp33-cp33m-macosx_10_6_x86_64.whl (97.4 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp33-cp33m-manylinux1_i686.whl (164.5 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp33-cp33m-manylinux1_x86_64.whl (179.4 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp33-cp33m-win32.whl (36.9 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp33-cp33m-win_amd64.whl (41.1 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (97.3 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp34-cp34m-manylinux1_i686.whl (181.5 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp34-cp34m-manylinux1_x86_64.whl (196.2 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp34-cp34m-win32.whl (36.9 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp34-cp34m-win_amd64.whl (41.2 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (97.3 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp35-cp35m-manylinux1_i686.whl (174.9 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp35-cp35m-manylinux1_x86_64.whl (188.8 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp35-cp35m-win32.whl (35.1 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp35-cp35m-win_amd64.whl (41.5 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (100.8 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp36-cp36m-manylinux1_i686.whl (183.5 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (197.9 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp36-cp36m-win32.whl (36.2 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Apr 13, 2017
bencoder.pyx-1.2.0-cp36-cp36m-win_amd64.whl (42.6 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Apr 13, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting