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.3.tar.gz
(4.6 kB
view details)
Built Distribution
File details
Details for the file torrent_tool-0.0.3.tar.gz
.
File metadata
- Download URL: torrent_tool-0.0.3.tar.gz
- Upload date:
- Size: 4.6 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 | 4fed27f0626c69d8139cdd442b4bcf2dc388a34c49271974d42e9652b559b242 |
|
MD5 | fcdf2a20e4855d54907d50ecfcecbdba |
|
BLAKE2b-256 | 3cce8237a24856881598ab4925338e5cce934b7f4735864eefcf450c1f595760 |
File details
Details for the file torrent_tool-0.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: torrent_tool-0.0.3-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 | c60c06b77f2d50a7cca91f648348efff2a68b11c9cfd8a2d436b6222c1b64aaf |
|
MD5 | cdfb6e2b37a7401bcbc5e875c158b383 |
|
BLAKE2b-256 | 2b05fd28627e9f526bb34fbc4141a65aea6b26766b998c0c3c2bdc3f63b6a748 |