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(data, /) -> '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(data, /) -> 'BDecodedType'
Decode bencode formatted bytes object.
torrent_files(data, /, tree: 'bool' = False) -> 'dict'
show all files and their lengths for a torrent
torrent_to_magnet(data, /, full: 'bool' = False, infohash_alg: 'str' = 'btih') -> 'str'
convert a torrent to a magnet link
DATA
__all__ = ['bencode', 'bdecode', 'dump', 'load', 'torrent_files', 'tor...
VERSION
(0, 0, 2, 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.4.1.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for torrent_tool-0.0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bf7b41412862b625681bf96de73bd8c7c677335cb4f5e80bf694d6453220c83 |
|
MD5 | 5657b26109f1aa1ac245abc8ff7fa81f |
|
BLAKE2b-256 | 1760255db21ea7245fde7c198e0db963efde648ebf70ef410743f520a48bc796 |