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 | Drone CI |
---|---|---|
Known vulnerabilities | License |
---|---|
Abstract • Setup virtualenv • Configure • Install dependencies • Usage • Running • Contributing
Abstract
Create a deluge python client for interfacing with deluge for common tasks like listing, adding, removing and setting download directory for torrents.
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
Usage
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
First we navigate to the folder we downloaded.
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
Install Required Dependencies
Now that we have our virutalenv set up and activated we want to install all the necessary packages listed in requirements.txt
. To install it's dependencies do the following:
$ pip install -r requirements.txt
Now we have our neccessary packages installed!
Usage
Custom delugeRPC client
Usage:
deluge_cli add MAGNET [DIR] [--debug | --warning | --error]
deluge_cli get TORRENT
deluge_cli ls [--downloading | --seeding | --paused]
deluge_cli toggle TORRENT
deluge_cli rm TORRENT [--debug | --warning | --error]
deluge_cli (-h | --help)
deluge_cli --version
Arguments:
MAGNET Magnet link to add
DIR Directory to save to
TORRENT A selected torrent
Options:
-h --help Show this screen
--version Show version
--debug Print all debug log
--warning Print only logged warnings
--error Print error messages (Error/Warning)
Running
To interface with deluged :
$ ./deluge_cli.py ls
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file delugeClient-kevin-0.3.1.tar.gz
.
File metadata
- Download URL: delugeClient-kevin-0.3.1.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7db80e60d75780e0a1d12ded1df7564e7a0bb1935eedd3712b26f83a50ce9127 |
|
MD5 | ac11f65bb7513a58fee13ae13fcd8c77 |
|
BLAKE2b-256 | 4cf302d8684d02f0e8bfb6fa0386bfbb643a253297c6dde44ab7d7fcb23ac418 |
File details
Details for the file delugeClient_kevin-0.3.1-py3.10.egg
.
File metadata
- Download URL: delugeClient_kevin-0.3.1-py3.10.egg
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b338a81734c65866d61674d6a01bce4d6ff45d74cbbe63e53c1c8b3abd8d7eb7 |
|
MD5 | 29be06e1259a26f146c1e9b3abfc1b86 |
|
BLAKE2b-256 | 3558ce188b77f2316d7ca918cd9835118f72a4e4576fb02ed60d5ab96ae15945 |