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

Uploaded Source

Built Distribution

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

torf-2.0.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torf-2.0.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3rc1

File hashes

Hashes for torf-2.0.0.tar.gz
Algorithm Hash digest
SHA256 80e5c41e1140d8733df51e74be770d63bad69770e40c2ca89cd1ae54b580f048
MD5 36397f03244f06f87a3e2660b97f1432
BLAKE2b-256 649dcf35cb20d6a4bc059ef279088df226491904a16de002de402f279981845e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torf-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3rc1

File hashes

Hashes for torf-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7651d6afdc89ead2356728b0a9f858639cf6c2187800b8e5f5649c4c741b1206
MD5 0aa7cec80746d424932dddba773d8267
BLAKE2b-256 ca63abbe589e86a473c426c1be150b584a89f7c05c87f64aba7e90c7a017cbfd

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