/torrent_parser

A .torrent file parser for both Python 2 and 3

Primary LanguagePythonMIT LicenseMIT

Torrent file parser for Python

Install

pip install torrent_parser

Usage:

CLI

$ pytp test.torrent
$ cat test.torrent | pytp

As a module

>>> import torrent_parser as tp
>>> data = tp.parse_torrent_file('test.torrent')
>>> print(data['announce'])
http://tracker.trackerfix.com:80/announce

Test

python -m unittest test

LICENSE

See License.