The tool to work with torrent files.
Project description
https://github.com/idlesign/torrentool
Description
The tool to work with torrent files.
Works on Python 2.7+ and 3.5+.
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
; Print out existing file info.
$ torrentool torrent info /home/my/some.torrent
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
torrentool-1.0.0.tar.gz
(15.6 kB
view details)
Built Distribution
File details
Details for the file torrentool-1.0.0.tar.gz
.
File metadata
- Download URL: torrentool-1.0.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/2.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7847637e2603ad8eaa263410764e19e7bed2fac2c48d4007b5126fdfa5a7c1a1 |
|
MD5 | 8c5ed8eedd5c2e53e87469e980dd0f3d |
|
BLAKE2b-256 | cb5464ade7bae9d37af3fcd29ea8ec760af34b9bf6fe4ef64ef54b986695fe89 |
File details
Details for the file torrentool-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: torrentool-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/2.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eef9e81b01ac445c96eaf4f1fc006b68ddfbdd7b0f9577b786d3403570b70be9 |
|
MD5 | ea7abc9fc2211897b7a33c870ee18baa |
|
BLAKE2b-256 | 33644b28566387d613bd416b336c5bc1f28ecaa0400b86d08627fb0ec95f4dda |