Deluge Client

raw JSON →
1.10.2 verified Fri May 01 auth: no python

Simple Deluge RPC client for managing a Deluge BitTorrent client. Current version 1.10.2, stable with occasional patches.

pip install deluge-client
error ModuleNotFoundError: No module named 'deluge_client'
cause Package not installed or wrong import name used (e.g., 'delugeclient' without underscore).
fix
Install with 'pip install deluge-client' and import with 'from deluge_client import DelugeRpcClient'.
error deluge_client.client.DelugeConnectionException: Connection was refused by the server
cause Deluge daemon not running, wrong host/port, or firewall blocking.
fix
Ensure deluged is running and accessible on the specified host and port. Check if host/port are correct and firewall allows connection.
breaking v1.5+ dropped Python 2 support. Python 3.6+ required.
fix Use Python 3.6 or newer. Pin to <1.5 if Python 2 is needed.
gotcha Authentication failure might not raise an obvious error; client.connect() returns True/False, and subsequent calls may raise DelugeConnectionException.
fix Always check the return value of client.connect() and wrap calls in try/except DelugeConnectionException.
deprecated The old import path `delugeclient` (without underscore) was removed in v1.0.
fix Use `from deluge_client import DelugeRpcClient` instead.

Connect to a Deluge daemon and list torrents with name and progress.

from deluge_client import DelugeRpcClient
client = DelugeRpcClient('localhost', 58846, 'username', 'password')
client.connect()
torrents = client.get_torrents_status({}, ['name', 'progress'])
print(torrents)