torrent tool.
Project description
BitTorrent Tool Module
- The BitTorrent Protocol Specification
- Peer-to-Peer (P2P) Architecture
- Peer-to-Peer Streaming Peer Protocol (PPSPP)
- http://jonas.nitro.dk/bittorrent/bittorrent-rfc.html
Installation
You can install from pypi
pip install -U torrent_tool
Usage
As a Command Line
You can use this module to convert torrent files to magnet links.
$ python -m torrent_tool -h
usage: torrent_tool.py [-h] [-f] [files ...]
torrent to magnet
positional arguments:
files paths to torrent files
options:
-h, --help show this help message and exit
-f, --full append more detailed queries
As a Module
>>> import torrent_tool
>>> help(torrent_tool)
Help on module torrent_tool:
NAME
torrent_tool - # encoding: utf-8
FUNCTIONS
bdecode(s, /) -> 'BDecodedType'
Decode bencode formatted bytes object.
bencode(o, fp=None, /)
Encode `object` into the bencode format.
dump = bencode(o, fp=None, /)
Encode `object` into the bencode format.
load = bdecode(s, /) -> 'BDecodedType'
Decode bencode formatted bytes object.
torrent_list(data, /) -> 'list[str]'
list all files from a torrent
torrent_to_magnet(data, /, full: 'bool' = False, infohash_alg: 'str' = 'btih') -> 'str'
convert a torrent into a magnet link
torrent_tree(data, /) -> 'dict'
tree all files from a torrent
DATA
__all__ = ['bencode', 'bdecode', 'dump', 'load', 'torrent_list', 'torr...
VERSION
(0, 0, 1)
AUTHOR
ChenyangGao <https://chenyanggao.github.io>
FILE
/path/to/torrent_tool.py
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
torrent_tool-0.0.2.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file torrent_tool-0.0.2.tar.gz
.
File metadata
- Download URL: torrent_tool-0.0.2.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.11.8 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1d26932c4998c182dec7594548136d0c7d8e412b1e9f4ac0ad16acca97baefa |
|
MD5 | 027c26fcb5346c209c12fb2d105f6a3d |
|
BLAKE2b-256 | cba82718636874750c21a049883b27c39071fbdae1d131f1de690bd9a39dbe08 |
File details
Details for the file torrent_tool-0.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: torrent_tool-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.11.8 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a734b9e581f41b8fb126d1bf4c0478be2af91a004fa3ea0bcd29f6a2c33523a |
|
MD5 | 6e78378e7d0175ef82fed82e7181b848 |
|
BLAKE2b-256 | bb530aecf99367bccda9b7c484d573e8d755de6c7da2ff031ff9ce9535713e89 |