No project description provided
Project description
Deluge Interface
Installing
python3 -m pip install deluge_interface
Requirements
- A running Deluge service
Usage
from deluge_interface import Deluge, Torrent, TorrentStatus
deluge = Deluge("http(s)://example.deluge.com", "your_password_here")
torrent: Torrent = deluge.add_magnet(uri: str)
status: TorrentStatus = torrent.get_status()
deluge.remove_torrent(torrent.id, False)
Adding Torrents
Torrents can be added by magnet link, local .torrent
file, or a remotely hosted URL to a .torrent
file. The relevant methods are as follows:
Deluge().add_magnet(uri: str, **kwargs) -> Torrent
Adds a magnet link to the queue, and returns a Torrent object with the relevant data.Deluge().add_torrent_from_url(url: str, headers: dict[str, str] = {}, **kwargs) -> Torrent
Adds a torrent URL to the queue, and returns a Torrent object with the relevant data.Deluge().add_torrent_from_file(*path, **kwargs) -> Torrent
Adds a torrent file frompath
to the queue, and returns a Torrent object with the relevant data.
Managing Torrents
Torrents can be removed, paused, or resumed in the current library version. The relevant methods are as follows:
Deluge().remove_torrent(torrent_id: str, remove_data: bool = False)
Removes torrent with idtorrent_id
. Ifremove_data
is true, all data associated with the torrent will also be removedTorrent().pause()
Pauses the torrent object.Torrent().resume()
Resumes the torrent object.Deluge().list_torrents() -> list[Torrent]
Gets all active torrents.
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 deluge_interface-0.1.0.tar.gz
.
File metadata
- Download URL: deluge_interface-0.1.0.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93ccb926159e70b69c20b5db7d499810cc5b2807fdd383783fba3372240dc09f |
|
MD5 | 8c121f42edc9c57c4039bf996e8ea031 |
|
BLAKE2b-256 | b74cedc3d70f8781e4c090e2b786c52597b0197c200233e7a08c5181b8b35ab8 |
File details
Details for the file deluge_interface-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: deluge_interface-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f06c7f2bb2eb9e8e950b0c8d1367f92156243b761c13c3e7052179023237a5c4 |
|
MD5 | cec794bc18083d2aa8160b4b0fc3fe43 |
|
BLAKE2b-256 | 6aba81c61010818484c492b1aa7c0f318c8e5c339e80172cd5b2c759d287b6ae |