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


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

Uploaded Source

Built Distribution

torrent_tool-0.0.4.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torrent_tool-0.0.4.3.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.11.8 Darwin/23.5.0

File hashes

Hashes for torrent_tool-0.0.4.3.tar.gz
Algorithm Hash digest
SHA256 8d15c3495ff03cee6783bab38685088eae17b8a5c98527fb40aef38dca2852f1
MD5 2248743befcd5b3e3aec9f6fc65297f6
BLAKE2b-256 4af029045312623dd01aa956f6c043ea6b97b569d0fea4756e1ea3dea973286f

See more details on using hashes here.

File details

Details for the file torrent_tool-0.0.4.3-py3-none-any.whl.

File metadata

  • Download URL: torrent_tool-0.0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.11.8 Darwin/23.5.0

File hashes

Hashes for torrent_tool-0.0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b50c6612635b3fcd19d2f2ee1ba85ce664788d54c1b36828d465a39e011bc97f
MD5 413ae63e9960fb60c4de7a3d2995d624
BLAKE2b-256 2921d2742c23269f5d67a1072e0468b5db0a8b48af2c9fa330aef260f0959dae

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