Skip to content

dust8/bencoding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 .

About

bencoding is implemented over python3.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published