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 details)
Built Distribution
File details
Details for the file torrent_tool-0.0.4.1.tar.gz
.
File metadata
- Download URL: torrent_tool-0.0.4.1.tar.gz
- Upload date:
- Size: 5.0 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 | ee62edc6010b9259bc6ddf30a9f3a6e7d5f78e3d96576a3afca061808a7b71e5 |
|
MD5 | c185247045924641ba86fda52825e6c5 |
|
BLAKE2b-256 | bdfb94aabbcf55618a9be0afaf1dd22160474cc4716272e44d9c50f593a455bb |
File details
Details for the file torrent_tool-0.0.4.1-py3-none-any.whl
.
File metadata
- Download URL: torrent_tool-0.0.4.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: 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 | 0bf7b41412862b625681bf96de73bd8c7c677335cb4f5e80bf694d6453220c83 |
|
MD5 | 5657b26109f1aa1ac245abc8ff7fa81f |
|
BLAKE2b-256 | 1760255db21ea7245fde7c198e0db963efde648ebf70ef410743f520a48bc796 |