Skip to main content

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

t = torf.Torrent(path='path/to/content',
                 trackers=['https://tracker1.example.org:1234/announce',
                           'https://tracker1.example.org:1234/announce'],
                 comment='This is a comment')
t.private = True
with open('my.torrent', 'wb') as f:
    t.write(f)

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.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torf-1.0rc3.tar.gz (12.5 kB view details)

Uploaded Source

File details

Details for the file torf-1.0rc3.tar.gz.

File metadata

  • Download URL: torf-1.0rc3.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for torf-1.0rc3.tar.gz
Algorithm Hash digest
SHA256 c442d72e5a6e3d19aad4f9524f91cc16fae2d42a0fb4af7aaae0833075aad41e
MD5 93a6c659c38f6bcea030111c6ccee7a7
BLAKE2b-256 607a1ffa4d251b5d4d5aa9f7948bb30efdbed4946110888254170f92f82a8353

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page