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

Uploaded Source

Built Distribution

torrent_tool-0.0.3.1-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: torrent_tool-0.0.3.1.tar.gz
  • Upload date:
  • Size: 4.6 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.1.tar.gz
Algorithm Hash digest
SHA256 4d723a23411e55e8ba9a7f3e4dd913c8c0c8f35ccb562ae5b27ed140036ad8e3
MD5 c41a2e1bae7aa2b7e1c79d322e9dd52a
BLAKE2b-256 ac487fa5a239fd1514c96171e2593d5545c39d82e60c26543771831ca29bf5e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torrent_tool-0.0.3.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.9 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.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bc34bcfcd28b4d298ce512333051bf805735941b826bb2d9d3dddaf0e523cf5e
MD5 f4e48a7bf328ea055c6fb2e1f67cc1df
BLAKE2b-256 0162513b81325cca5c7ef552257733464c43a137f97c2986b91835c716a570fd

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