High-level Python 3 module for creating and parsing torrent files
Project description
torf provides a high-level, flexible Torrent class that holds torrent metainfo and can export it to and import it from .torrent files. It can also create BTIH magnet links.
It started as a fork of dottorrent but turned into a rewrite with more features like full control over the torrent’s metainfo, validation, randomization of the info hash to help with cross-seeding and more.
Example
from torf import Torrent
t = Torrent(path='path/to/content',
trackers=['https://tracker1.example.org:1234/announce',
'https://tracker2.example.org:1234/announce'],
comment='This is a comment')
t.private = True
t.generate()
t.write('my.torrent')
Documentation
Documentation is in the docstrings. Read it locally by running pydoc3 torf.Torrent after the installation. It’s also available online.
Installation
torf is available on PyPI.
The latest development version is in the master branch on GitHub.
Contributing
I consider this project feature complete, but feel free to request new features or improvements. Bug reports are of course always welcome.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.