Skip to main content

🐍 Python Deluge CLI

A easy to use Deluge CLI that can connect to Deluge RPC (even over ssh) written entirely in python.

Tested version PyPi package License
PyVersion PyPI License
Drone CI Known vulnerabilities
Build Status Known Vulnerabilities

Abstract • Install • Usage • Setup Virtual Environment • Configure • Contributing

Abstract

Create a deluge python client for interfacing with deluge for common tasks like listing, adding, removing and setting download directory for torrents.

Install

Install from source:

python3 setup.py install

Install from pip:

pip3 install delugeClient-kevin

Usage

View delugeClient cli options with delugeclient --help:

 Usage: python -m delugeclient [OPTIONS] COMMAND [ARGS]...

╭─ Options ───────────────────────────────────────────────────────────────╮
│ --debug                       Set log level to debug                    │
│ --info                        Set log level to info                     │
│ --warning                     Set log level to warning                  │
│ --error                       Set log level to error                    │
│ --install-completion          Install completion for the current shell. │
│ --show-completion             Show completion for the current shell     │
│ --help                        Show this message and exit.               │
╰─────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────╮
│ add                Add magnet torrent                                   │
│ disk               Get free disk space                                  │
│ get                Get torrent by id or hash                            │
│ ls                 List all torrents                                    │
│ remove             Remove torrent by id or hash                         │
│ rm                 Remove torrent by name                               │
│ search             Search for string segment in torrent name            │
│ toggle             Toggle torrent download state                        │
│ version            Print package version                                │
╰─────────────────────────────────────────────────────────────────────────╯

Running from source

Run from source for fun or during development using module flag:

python3 -m delugeClient --help

Setup Virtual Environment

Virtual environment allows us to create a local environment for the requirements needed. Because pip does not download packages already downloaded to your system, we can use virtualenv to save our packages in the project folder.

Installation

To install virtualenv, simply run:

 $ pip install virutalenv

Virtualenv setup

After you have downloaded this project go to it in your terminal by going to the folder you downloaded and typing the following:

 $ cd delugeClient/

The to setup a virtual environment enter this:

 $ virtualenv -p python3.10 env

If you get an error now it might be because you don't have python3.10, please make sure you have python version 3.10 if else you can download it from here

Then we use the virtualenv command to create a env subdirectory in our project. This is where pip will download everything to and where we can add other specific python versions. Then we need to activate our virtual environment by doing:

 $ source env/bin/activate

You should now see a (env) appear at the beginning of your terminal prompt indicating that you are working from within the virtual environment. Now when you install something:

 $ pip install <package>

It will get installed in the env folder, and not globaly on our machine.

The leave our virtual environment run:

 $ deactivate

Configure the Config File

The following is where we need to do some manual editing of our config file. Open to config.ini in your favorite text editor.

 $ (vi) config.ini

Then you need to change the HOST and PORT to reflect the address for your deluged client. The username and password needed to connect can be found under:

(Only tested on ubuntu)

 $ cat /home/USER/.config/deluge/auth

Contributing

  • Fork it!
  • Create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request

Metadata

Release files for delugeClient-kevin 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for delugeClient-kevin 0.3.5
File Size Uploaded
delugeClient-kevin-0.3.5.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for delugeClient-kevin 0.3.5
File Interpreter ABI Platform
delugeClient_kevin-0.3.5-py3-none-any.whl Python 3 none any Details

Total release size: 24.3 kB

Release files / delugeClient-kevin-0.3.5.tar.gz

Download URL delugeClient-kevin-0.3.5.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4a96a6ff739748b41e7c010c71e49fb5de06fe049535405f21106f76b302313e
BLAKE2b-256 checksum
How to use checksums
3133548b36882fe0aa28d3ecc6bced9096f2c7ace8fb943635ba1b1a748c82a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Release files / delugeClient_kevin-0.3.5-py3-none-any.whl

Download URL delugeClient_kevin-0.3.5-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68366a5e43e407ae2bc2cbab41a16e1ab0ccdf664db5310c45f546071dd7a2b0
BLAKE2b-256 checksum
How to use checksums
0a93c11ff516e211c0e5420aeab96fbcd15f8cfb676625d6a5ae26b0ad393ca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Release history Release notifications | RSS feed

This release

0.3.5 This release

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.1

2 release files

0.3.0

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page