https://github.com/kevinmidboe/delugeclient
Deluge client with custom functions written in python
https://github.com/kevinmidboe/delugeclient
deluge python
Last synced: 2 months ago
JSON representation
Deluge client with custom functions written in python
- Host: GitHub
- URL: https://github.com/kevinmidboe/delugeclient
- Owner: KevinMidboe
- License: mit
- Created: 2018-05-03T22:05:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-10T08:13:00.000Z (about 1 year ago)
- Last Synced: 2024-11-12T21:10:24.471Z (11 months ago)
- Topics: deluge, python
- Language: Python
- Homepage:
- Size: 67.4 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
🐍 Python Deluge CLIA easy to use Deluge CLI that can connect to Deluge RPC (even over ssh) written entirely in python.
| Tested version | PyPi package | License |
|:--------|:------|:------|
| [](https://www.python.org/downloads/release/python-3100/) | [](https://pypi.org/project/delugeClient_kevin/) |[](LICENSE)| Drone CI | Known vulnerabilities |
|:--------|:------|
| [](https://drone.schleppe.cloud/KevinMidboe/delugeClient) | [](https://snyk.io/test/github/kevinmidboe/delugeClient?targetFile=requirements.txt)
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:
```bash
python3 setup.py install
```Install from pip:
```bash
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](https://www.python.org/downloads/)
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
```It will get installed in the env folder, and not globaly on our machine.
The leave our virtual environment run:
```
$ deactivate
```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