Skip to main content

torrent tool.

Project description

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(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

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.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

torrent_tool-0.0.2.1-py2.py3-none-any.whl (6.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file torrent_tool-0.0.2.1.tar.gz.

File metadata

  • Download URL: torrent_tool-0.0.2.1.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

Hashes for torrent_tool-0.0.2.1.tar.gz
Algorithm Hash digest
SHA256 fef5b2e321002739ef9a746439f7e75a4538e6f104160bf476f01fb1bc362676
MD5 2de461e5ce62f8e75513592cb1e6959b
BLAKE2b-256 41d5f714bf6f030c663d99be061879da16fd688ece348bacf005f933138c1e62

See more details on using hashes here.

File details

Details for the file torrent_tool-0.0.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: torrent_tool-0.0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.0 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

Hashes for torrent_tool-0.0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8be1110c77eca97ae23c02f6db93ef6a21d7027a252ee03406a8f0e8988191ce
MD5 45edc7fa0756f970558187c00387edf6
BLAKE2b-256 4fab511fced131a02fde6c47641ec93e0a89f2c626ada4f350fba86e40040eef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page