skillfed

libtorrent

Python bindings for libtorrent-rasterbar

libtorrent v2.1.1 91.5K downloads/30d#13,516 on PyPI
Permissive license BSD Active released

What it is and what it does

Libtorrent is a Python binding to the libtorrent-rasterbar C++ library, providing low-level access to torrent protocol operations. It lets you build torrent clients, seeders, or peer-to-peer applications in Python by wrapping the underlying native library's session management, torrent handling, and peer communication.

The package ships as precompiled wheels for multiple platforms and Python versions, eliminating the need to compile libtorrent yourself. With no runtime dependencies and active maintenance, it's ready to use immediately after installation, though you'll need to understand the libtorrent API surface to build applications with it.

Use it for:

  • Build a custom torrent client or downloader application with fine-grained protocol control.
  • Seed files or manage peer-to-peer distribution of large datasets without a separate torrent application.
  • Integrate torrent functionality into an existing Python application for content delivery.
  • Research or test BitTorrent protocol behavior and peer interactions programmatically.
  • Implement decentralized file-sharing features in a Python service or tool.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Python bindings for libtorrent-rasterbar, enabling torrent protocol operations from Python code.

Yes, if you need torrent protocol support in Python. Active maintenance, no vulnerabilities, permissive license, and medium install friction via prebuilt wheels make it practical. Verify Python version compatibility before installing, as the metadata does not specify a minimum version. Not needed for simple torrent downloads—consider a standalone client instead.

Install

libtorrent on PyPI

pip

pip install libtorrent

uv

uv add libtorrent

poetry

poetry add libtorrent

Installing libtorrent

Before you install

Medium install friction due to compiled wheels; prebuilt binaries available for common platforms (macOS, Linux, Windows, multiple architectures). Active maintenance with recent release (4 days old). No runtime dependencies simplifies deployment.

License in practice

BSD permissive license allows use in most projects with minimal restrictions; review license text for specific attribution or liability terms if bundling.

Quickstart

pip install libtorrent
import libtorrent
# Create a session and add torrents via the libtorrent API

Requires a compatible Python version and platform architecture matching available wheels; no official Python version constraint documented.

Verify before relying

  • Exact Python version support range (requires_python is unspecified in metadata)
  • Whether documentation exists beyond the homepage link
  • API stability guarantees or breaking-change policy across versions

Package facts

License BSD (permissive)
Python support not specified
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 4 days since the last release
First released
Downloads 91,457/month — #13,516 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: libtorrent-2.1.1-cp310-cp310-macosx_14_0_arm64.whl; libtorrent-2.1.1-cp310-cp310-macosx_15_0_arm64.whl; libtorrent-2.1.1-cp310-cp310-macosx_15_0_x86_64.whl; libtorrent-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; libtorrent-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; libtorrent-2.1.1-cp310-cp310-musllinux_1_2_aarch64.whl; libtorrent-2.1.1-cp310-cp310-musllinux_1_2_x86_64.whl; libtorrent-2.1.1-cp310-cp310-win32.whl; libtorrent-2.1.1-cp310-cp310-win_amd64.whl; libtorrent-2.1.1-cp311-cp311-macosx_14_0_arm64.whl; libtorrent-2.1.1-cp311-cp311-macosx_15_0_arm64.whl; libtorrent-2.1.1-cp311-cp311-macosx_15_0_x86_64.whl; libtorrent-2.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; libtorrent-2.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; libtorrent-2.1.1-cp311-cp311-musllinux_1_2_aarch64.whl; libtorrent-2.1.1-cp311-cp311-musllinux_1_2_x86_64.whl; libtorrent-2.1.1-cp311-cp311-win32.whl; libtorrent-2.1.1-cp311-cp311-win_amd64.whl; libtorrent-2.1.1-cp312-cp312-macosx_14_0_arm64.whl; libtorrent-2.1.1-cp312-cp312-macosx_15_0_arm64.whl

Tags

torrent protocol pythonlibtorrent bindingspython torrent clientbittorrent library pythontorrent download pythonp2p file sharing pythontorrent management
p2p-networkingtorrent-protocolnative-bindings

More Networking packages