Skip to main content

torf

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

Metadata

Release files for torf 1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for torf 1.4
File Size Uploaded
torf-1.4.tar.gz 14.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for torf 1.4
File Interpreter ABI Platform
torf-1.4-py3-none-any.whl Python 3 none any Details

Total release size: 33.1 kB

Release files / torf-1.4.tar.gz

Download URL torf-1.4.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9a6bf9e5707a8b126116885aaea5a30d15f62076ba2c2c0d8707c5f8b82d224d
BLAKE2b-256 checksum
How to use checksums
82d7119a534b0f35b9c3a8b84f5ffefa7416dbf920f0920102884fcec70f021f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / torf-1.4-py3-none-any.whl

Download URL torf-1.4-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76068ff7db3697ea5bf62d2c9b31e35a25dbd94a2b79a70f07fc21f04cf31751
BLAKE2b-256 checksum
How to use checksums
82cfb8986ef02c746f2da39bd9ab90694e65348558a970018dcd1174f8789a2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page