Skip to main content

The tool to work with torrent files.

Project description

https://github.com/idlesign/torrentool

https://img.shields.io/pypi/v/torrentool.svg https://img.shields.io/pypi/dm/torrentool.svg https://img.shields.io/pypi/l/torrentool.svg https://img.shields.io/coveralls/idlesign/torrentool/master.svg https://img.shields.io/travis/idlesign/torrentool/master.svg https://landscape.io/github/idlesign/torrentool/master/landscape.svg?style=flat

Description

The tool to work with torrent files.

Works on Python 2.7+ and 3.3+.

Includes:

  • Command line interface (requires click package to be installed)

  • Torrent utils (file creation, read and modification)

  • Bencoding utils (decoder, encoder)

Using CLI

; Make .torrent out of `video.mkv`
$ torrentool torrent create /home/my/files_here/video.mkv

; Make .torrent out of entire `/home/my/files_here` dir,
; and put some open trackers announce URLs into it,
; and publish file on torrent caching service, so it is ready to share.
$ torrentool torrent create /home/my/files_here --open_trackers --cache

Use command line --help switch to know more.

From your Python code

from torrentool.api import Torrent

# Reading and modifying an existing file.
my_torrent = Torrent.from_file('/home/idle/some.torrent')
my_torrent.total_size  # Total files size in bytes.
my_torrent.magnet_link  # Magnet link for you.
my_torrent.comment = 'Your torrents are mine.'  # Set a comment.
my_torrent.to_file()  # Save changes.

# Or we can create a new torrent from a directory.
new_torrent = Torrent.create_from('/home/idle/my_stuff/')  # or it could have been a single file
new_torrent.announce_urls = 'udp://tracker.openbittorrent.com:80'
new_torrent.to_file('/home/idle/another.torrent')

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

torrentool-0.3.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

torrentool-0.3.0-py2.py3-none-any.whl (11.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file torrentool-0.3.0.tar.gz.

File metadata

  • Download URL: torrentool-0.3.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for torrentool-0.3.0.tar.gz
Algorithm Hash digest
SHA256 08993e0fc273d4f2df5271875f015b6cfba1b3597c8d58fa0be1deda85bae646
MD5 efcb29581ea72d4e6b7ca2f8cef42b0a
BLAKE2b-256 0d464584699a76348e03fea4570e415dcb69bad9c09ceda1542bc15348a7f47f

See more details on using hashes here.

File details

Details for the file torrentool-0.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for torrentool-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9840c5c983407a77d14d04100b9c3eac2b961fde6f79d72a6b69773c2656699d
MD5 8c27b64c90dd692b65070334a363ef28
BLAKE2b-256 4e993c37f2432c8ec96d2ab8f81988141a5f52d0b648d6b10967bb29e3e8da7c

See more details on using hashes here.

Supported by

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