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

Uploaded Source

Built Distribution

torf-1.4-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for torf-1.4.tar.gz
Algorithm Hash digest
SHA256 9a6bf9e5707a8b126116885aaea5a30d15f62076ba2c2c0d8707c5f8b82d224d
MD5 1312c4ec4d899ae8fa4b51119ddaba68
BLAKE2b-256 82d7119a534b0f35b9c3a8b84f5ffefa7416dbf920f0920102884fcec70f021f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for torf-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 76068ff7db3697ea5bf62d2c9b31e35a25dbd94a2b79a70f07fc21f04cf31751
MD5 db5e78875fea209598f40aaa9d257266
BLAKE2b-256 82cfb8986ef02c746f2da39bd9ab90694e65348558a970018dcd1174f8789a2e

See more details on using hashes here.

Supported by

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