libtorrent
Python bindings for libtorrent-rasterbar
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 libtorrentuv
uv add libtorrentpoetry
poetry add libtorrentInstalling 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
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
qbittorrent-apiPython client library that wraps the…
permissive · top 15,000 on PyPI
py3createtorrentCommand-line utility to create torrent files…
copyleft · top 15,000 on PyPI
bencode.pyEncodes and decodes bencode format, the binary…
unclear · top 15,000 on PyPI
deluge-clientA lightweight pure-Python RPC client that…
permissive · top 15,000 on PyPI
transmission-rpcPython wrapper around the Transmission…
permissive · top 15,000 on PyPI
pyobjc-framework-MultipeerConnectivityProvides Python bindings to macOS's…
permissive · top 15,000 on PyPI
multiaddrParses, constructs, and manipulates…
permissive · top 15,000 on PyPI
pysmbpysmb implements the SMB/CIFS protocol to let…
permissive · top 5,000 on PyPI
rpds-pyProvides Python bindings to Rust's persistent…
permissive · top 100 on PyPI
pybitpybit is the official Python connector for…
permissive · top 15,000 on PyPI