2017-05-23 13:35:40 +08:00
2017-05-23 13:35:40 +08:00
2018-04-06 13:58:53 +08:00
2017-05-23 13:35:40 +08:00
2017-05-23 13:35:40 +08:00

Torrent file parser for Python

A simple parser for .torrent file.

Can also edit and write back to torrent format after version 0.1.5.

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
>>> data['announce'] = 'http://127.0.0.1:12345'
>>> tp.create_torrent_file('new.torrent', data)

Test

python -m unittest tests

Changelog

See Changelog.

LICENSE

See License.

Description
No description provided
Readme 257 KiB
Languages
Python 100%