bencoding is implemented over python3.


Keywords
bcode, bencode, bencoding, torrent, bittorrent
License
MIT
Install
pip install bencoding==0.2.6

Documentation

Bencoding : BCODE for Python3

Bencoding is a Bcode library for Python3.

>>> from bencoding import bdecode
>>> with open('ubuntu-16.04.1-desktop-amd64.iso.torrent', 'rb') as f:
        data = bdecode(f.read())
>>> data.keys()
odict_keys([b'announce', b'announce-list', b'comment', b'creation date', b'info'])
>>> data[b'info'][b'name'].decode()
'ubuntu-16.04.1-desktop-amd64.iso'
>>> data[b'info'][b'piece length']
524288

Installation

To install Bencoding, simply:

$ pip install bencoding

Documentation

Documenttation is available at http://bencoding.readthedocs.io .