Aria2 RPC Client
Project description
How to using this package
Installing
pip install aria2_rpc_client
Using
from aria2_rpc_client import DefaultClient
from aria2_rpc_client import DefaultConnection
from aria2_rpc_client import FileDownloadOptions
# Make connection, enter aria2 rpc server information
connection = DefaultConnection("localhost", "6800", "top_secret_key")
# Make client
client = DefaultClient(connection)
# Download options
options = FileDownloadOptions()
options.set_filename("changed.mkv")
options.set_dir("/home/user/downloads")
options.add_header("token", "da78d676ds6a86dsa6d8sa6d8")
# Download start & set options
result = client.add_uri(["https://jell.yfish.us/media/jellyfish-15-mbps-hd-h264.mkv"], options)
# Get defined GID number from aria2
print(result)
# 6be2fb970af88d07
# Set download pause
pause_download = client.pause(result)
print(pause_download)
# 6be2fb970af88d07
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
aria2_rpc_client-0.4.5.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for aria2_rpc_client-0.4.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b29b03962853cc36d42aed4e7692d365cd4d25f9432021de9f8750016517fecf |
|
MD5 | 2a8ab0c9f5a30d9f0fd60873caf472cf |
|
BLAKE2b-256 | acc83974c651e5e7344193990db9e48a83c1bf1910991ce9a85dac49b1faa7e4 |