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

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

Uploaded Source

Built Distribution

torrent_tool-0.0.3.2-py2.py3-none-any.whl (6.1 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: torrent_tool-0.0.3.2.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.3.2.tar.gz
Algorithm Hash digest
SHA256 b423a6fc7d73f902739de612ac873a178b6560d70282f7b031f184727c8e0812
MD5 a4d733561ef449a85031fda8c6a2bf6c
BLAKE2b-256 ff628c25d61a31467dde735851a1164bacc377a539285cc80de89c194ee8bad2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torrent_tool-0.0.3.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.1 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.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 17fe0ec5fc19122c586127400e9c50e3cebcdce5a739677f82747a07487546bf
MD5 9f2cc1fea0d828b07d1ef32ebc00d719
BLAKE2b-256 688f052923cc7d6e61b0b1b4a9eefbbddb3775920c0fe118563dfa6138526d04

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