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
deluge_interface-0.1.0.tar.gz
(1.8 kB
view hashes)
Built Distribution
Close
Hashes for deluge_interface-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f06c7f2bb2eb9e8e950b0c8d1367f92156243b761c13c3e7052179023237a5c4 |
|
MD5 | cec794bc18083d2aa8160b4b0fc3fe43 |
|
BLAKE2b-256 | 6aba81c61010818484c492b1aa7c0f318c8e5c339e80172cd5b2c759d287b6ae |