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.

torf-cli is a command line tool that makes use of torf.

Example

from torf import Torrent
t = Torrent(path='path/to/content',
            trackers=['https://tracker1.example.org:1234/announce',
                      'https://tracker2.example.org:5678/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 always welcome, of course.

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.5.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torf-1.5-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file torf-1.5.tar.gz.

File metadata

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

File hashes

Hashes for torf-1.5.tar.gz
Algorithm Hash digest
SHA256 794eb69e5367ecae6e5d215c888ab0553a15eff321d5de711db653d84f45714d
MD5 8fc4af7ebc4672881a9ce07c0e152189
BLAKE2b-256 40ef3037082c59e62874b343e141aea6e0447bd80d41bba4757f42dd3aeee472

See more details on using hashes here.

File details

Details for the file torf-1.5-py3-none-any.whl.

File metadata

  • Download URL: torf-1.5-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for torf-1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 83e752598e8caec5df6990cfb14b6d95a0dc03e3dc9290313e6f88de2a5cc5e3
MD5 80164f65d174b8ad6da9bbf4d1946f9e
BLAKE2b-256 a6b2d59ad0af902381b8c660341ad788a13797227d3cad7f441a05d01c987737

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