skillfed

qbittorrent-api

Python client for qBittorrent v4.1+ Web API.

qbittorrent-api v2026.8.0 282.2K downloads/30d#8,087 on PyPI511
Permissive license MIT Active released

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-api

uv

uv add qbittorrent-api

poetry

poetry add qbittorrent-api

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: Communications :: File SharingTopic :: Utilities

Tags

qbittorrent web api clientpython torrent control libraryqbittorrent automationtorrent management apiqbittorrent remote controlpython qbittorrent integrationtorrent client api wrapper
torrent-automationapi-wrapperqbittorrent

More Utilities packages