qbittorrent-api
Python client for qBittorrent v4.1+ Web API.
What it is and what it does
qbittorrent-api is a Python wrapper around the qBittorrent Web API that lets you control a qBittorrent instance programmatically. It handles the HTTP communication, authentication, and session management so you can focus on torrent operations—adding, removing, pausing, and querying torrents—through a clean Python interface. The library automatically detects your qBittorrent version and adapts to available API endpoints, and it manages login cookies transparently so you don't have to.
The package supports qBittorrent v5.2.3 (Web API v2.15.1) and works with Python 3.10 through 3.14. It depends only on packaging, requests, and urllib3, making it lightweight to install. The library is actively maintained, with releases tracking qBittorrent updates closely, and it includes a context-manager interface for safe resource cleanup.
Use it for:
- Automate torrent downloads and management in scripts or applications without manual WebUI interaction.
- Monitor torrent status and qBittorrent health metrics from external monitoring or logging systems.
- Build a custom dashboard or control panel that queries and manages torrents via qBittorrent's API.
- Integrate torrent operations into larger automation workflows or CI/CD pipelines.
- Programmatically add, pause, or remove torrents based on external triggers or conditions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python client library that wraps the qBittorrent Web API, allowing you to control torrents, manage application settings, and query status programmatically.
Yes. The package is actively maintained, has no known vulnerabilities, installs cleanly with minimal dependencies, and is MIT-licensed. It covers the full qBittorrent Web API surface and handles version compatibility automatically. Install it if you need to control qBittorrent from Python code.
Install
qbittorrent-api on PyPI
pip
pip install qbittorrent-apiuv
uv add qbittorrent-apipoetry
poetry add qbittorrent-apiInstalling qbittorrent-api
Before you install
Low install friction with a pure-Python wheel and only three runtime dependencies (packaging, requests, urllib3). Active maintenance with a release 13 days ago; the project has been maintained since 2019 and tracks qBittorrent releases closely.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.
Quickstart
pip install qbittorrent-api
import qbittorrentapi
conn_info = dict(host="localhost", port=8080, username="admin", password="adminadmin")
qbt_client = qbittorrentapi.Client(**conn_info)
qbt_client.auth_log_in()
for torrent in qbt_client.torrents_info():
print(f"{torrent.hash[-6:]}: {torrent.name} ({torrent.state})")
Requires Python 3.10 or later; requires a running qBittorrent instance with Web API enabled and network access to its WebUI port.
Verify before relying
- Whether automatic session-cookie renewal works reliably across network interruptions or long-lived client instances.
- Performance characteristics when managing large numbers of torrents or frequent API calls.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — packaging, requests, urllib3 |
| Maintenance | actively maintained — 13 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 282,224/month — #8,087 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: qbittorrent_api-2026.8.0-py3-none-any.whl
Keywords: python, qbittorrent, api, client, torrent, torrents, webui, web
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
libtorrentPython bindings for libtorrent-rasterbar,…
permissive · top 15,000 on PyPI
py3createtorrentCommand-line utility to create torrent files…
copyleft · top 15,000 on PyPI
deluge-clientA lightweight pure-Python RPC client that…
permissive · top 15,000 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
boxsdkProvides a Python client library for…
permissive · top 5,000 on PyPI
kanboardA Python client library that wraps the Kanboard…
permissive · top 15,000 on PyPI
music-assistant-clientPython async client library for connecting to…
permissive · top 15,000 on PyPI
arcticdbArcticDB is a serverless DataFrame database…
unclear · top 15,000 on PyPI
PlexAPIUnofficial Python bindings for the Plex API…
permissive · top 15,000 on PyPI
tensorflow-io-gcs-filesystemProvides Google Cloud Storage filesystem…
permissive · top 5,000 on PyPI