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://landscape.io/github/idlesign/torrentool/master/landscape.svg?style=flat https://img.shields.io/travis/idlesign/torrentool/master.svg https://img.shields.io/codeclimate/github/idlesign/torrentool.svg

Description

The tool to work with torrent files.

Works on Python 2.7+ and 3.3+.

Includes:

  • Torrent utils (file creation, read and modification)

  • Bencoding utils (decoder, encoder)

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.2.0.tar.gz (10.3 kB view hashes)

Uploaded Source

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