Skip to main content

Deluge client with custom functions written in python

Project description

๐Ÿ 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

Project details


Download files

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

Source Distribution

delugeClient-kevin-0.3.4.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

delugeClient_kevin-0.3.4-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file delugeClient-kevin-0.3.4.tar.gz.

File metadata

  • Download URL: delugeClient-kevin-0.3.4.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for delugeClient-kevin-0.3.4.tar.gz
Algorithm Hash digest
SHA256 24457137ad9d9b45ed41ed6a0687f515c5758f096893d1f4a6550b7ebc8f1b59
MD5 31dc6f368db1c2eab273d6e3a80c14d9
BLAKE2b-256 0d5674ec5dea001f595a9271e1062ee5069c15b1b503464899c725753eb29e65

See more details on using hashes here.

File details

Details for the file delugeClient_kevin-0.3.4-py3-none-any.whl.

File metadata

File hashes

Hashes for delugeClient_kevin-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 36f2c009e996049838420a194c38abf5fa54e2644260c2df576cfd4c3594b145
MD5 fa317ceff7c1583cf0595bc73a37664b
BLAKE2b-256 a332289d6ef6f4780c6557ffafa80d44f7495c0d389f8c4a7c9690e52e11b0f5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page