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.5.tar.gz (12.2 kB view hashes)

Uploaded Source

Built Distribution

delugeClient_kevin-0.3.5-py3-none-any.whl (12.1 kB view hashes)

Uploaded Python 3

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