Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Simple Deluge Client

Project description

A lightweight pure-python rpc client for deluge. Note, does not support events and any additional replies from deluge will mess up the datastream.


  • Deluge 1.3.x, 2.0 beta
  • Python 2.7, 3.4, 3.5, 3.6


From GitHub (develop):

pip install git+

From PyPi (stable):

pip install deluge-client


>>> from deluge_client import DelugeRPCClient

>>> client = DelugeRPCClient('', 12345, 'username', 'password')
>>> client.connect()
>>> client.connected
>>>'core.get_torrents_status', {}, ['name'])
{'79816060ea56d56f2a2148cd45705511079f9bca': {'name': 'TPB.AFK.2013.720p.h264-SimonKlose'}}
>>> client.core.get_torrents_status({}, ['name'])
{'79816060ea56d56f2a2148cd45705511079f9bca': {'name': 'TPB.AFK.2013.720p.h264-SimonKlose'}}

Idiom to use for automatic reconnect where the daemon might be offline at call time.

import time

from deluge_client import DelugeRPCClient, FailedToReconnectException

def call_retry(client, method, *args, **kwargs):
    # We will only try the command 10 times
    for _ in range(10):
            return, *args, **kwargs)
        except FailedToReconnectException:
            # 5 second delay between calls

Idiom usage

client = DelugeRPCClient('', 58846, 'username', 'password', automatic_reconnect=True)
# The client has to be online when you start the process,
# otherwise you must handle that yourself.
call_retry(client, 'core.get_torrents_status', {}, ['name'])



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for deluge-client, version 1.7.1
Filename, size File type Python version Upload date Hashes
Filename, size deluge_client-1.7.1-py2.py3-none-any.whl (11.7 kB) File type Wheel Python version 3.6 Upload date Hashes View hashes
Filename, size deluge-client-1.7.1.tar.gz (10.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page