torrentool
https://github.com/idlesign/torrentool
Description
The tool to work with torrent files.
Works on Python 3.7+.
Includes:
Command line interface. Requires click package to be installed.
Use pip install torrentool[cli] to install this dependency automatically.
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')
Metadata
Release files for torrentool 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| torrentool-1.2.0.tar.gz | 533.7 kB | Without provenance | Details for torrentool-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| torrentool-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for torrentool-1.2.0-py3-none-any.whl |
Total release size: 546.7 kB
Release files / torrentool-1.2.0.tar.gz
| Download URL | torrentool-1.2.0.tar.gz |
|---|---|
| Size | 533.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72cdd049eaf856ddc907d1d61527764ef0288512087d93a49267e00c4033c429
|
|
BLAKE2b-256 checksum How to use checksums |
f767a2aa492be0207f89952fa766005893e304aaf9971336cd2a8a7a79d3ff9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / torrentool-1.2.0-py3-none-any.whl
| Download URL | torrentool-1.2.0-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bc6c55622e23978cf3c1e4aaf8f087971d75608c15b83be5a2c029464d3dd803
|
|
BLAKE2b-256 checksum How to use checksums |
af5c3170e7d18043ee996e9b069994419eacbec5683bf0fb7c0d4d41cb069365
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for torrentool 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.