Skip to main content

BitTorrent Tool Module

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

Metadata

Release files for torrent_tool 0.0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for torrent_tool 0.0.4.3
File Size Uploaded Provenance Actions
torrent_tool-0.0.4.3.tar.gz 5.2 kB Without provenance Details for torrent_tool-0.0.4.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for torrent_tool 0.0.4.3
File Interpreter ABI Platform Actions
torrent_tool-0.0.4.3-py3-none-any.whl Python 3 none any Details for torrent_tool-0.0.4.3-py3-none-any.whl

Total release size: 12.3 kB

Release files / torrent_tool-0.0.4.3.tar.gz

Download URL torrent_tool-0.0.4.3.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8d15c3495ff03cee6783bab38685088eae17b8a5c98527fb40aef38dca2852f1
BLAKE2b-256 checksum
How to use checksums
4af029045312623dd01aa956f6c043ea6b97b569d0fea4756e1ea3dea973286f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.11.8 Darwin/23.5.0

Release files / torrent_tool-0.0.4.3-py3-none-any.whl

Download URL torrent_tool-0.0.4.3-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b50c6612635b3fcd19d2f2ee1ba85ce664788d54c1b36828d465a39e011bc97f
BLAKE2b-256 checksum
How to use checksums
2921d2742c23269f5d67a1072e0468b5db0a8b48af2c9fa330aef260f0959dae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.11.8 Darwin/23.5.0

Security for torrent_tool 0.0.4.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page