Skip to main content

torrentlib

Python helpers for BitTorrent tracker queries, peer communication, and metadata inspection.

torrentlib is not a full BitTorrent client. It can:

  • load .torrent metadata
  • announce to HTTP and UDP trackers
  • collect IPv4 and IPv6 peer lists
  • connect to peers and download metadata
  • process peer exchange (ut_pex) messages
  • edit and rebuild .torrent files

It does not manage piece downloads/uploads for complete content transfer.

Installation

pip install torrentlib

Supports Python 3.10 through 3.14.

Public API

from torrentlib import Torrent, TorrentMetaInfo, TorrentStatus, Peer
from torrentlib.Tracker import Check, Query

Usage

Please refer to the Wiki for detailed usage examples and API reference.

License

MIT. See LICENSE.

Metadata

Release files for torrentlib 1.2.0

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

Source distribution (sdist)

Source distribution for torrentlib 1.2.0
File Size Uploaded
torrentlib-1.2.0.tar.gz 22.6 kB Details

Built distribution (wheel)

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

Total release size: 69.9 kB

Release files / torrentlib-1.2.0.tar.gz

Download URL torrentlib-1.2.0.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
43c7cc12b4543fde8f0ece35c233349271c59dac9b9be4a014ac89dc1666a6ba
BLAKE2b-256 checksum
How to use checksums
d08e4eed47e4b78f9822be233f07ff71ecaa9667b1f0a7026c46e1234ce64a14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / torrentlib-1.2.0-py3-none-any.whl

Download URL torrentlib-1.2.0-py3-none-any.whl
Size 47.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d70dbfe92a30f14752930d64ce710001a271434baeecff000eaad827c9f2f26
BLAKE2b-256 checksum
How to use checksums
924e027ba3985b83c0b4926344c93c78552386c01b9b3a2e852adf9d0da1cb71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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