https://github.com/ozkansen/aria2_rpc_client
Aria2 RPC Client for Python. MIT licence
https://github.com/ozkansen/aria2_rpc_client
aria2 client python rpc xmlrpc-client
Last synced: 2 months ago
JSON representation
Aria2 RPC Client for Python. MIT licence
- Host: GitHub
- URL: https://github.com/ozkansen/aria2_rpc_client
- Owner: ozkansen
- License: mit
- Created: 2021-11-16T20:30:05.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2023-03-16T10:27:15.000Z (about 3 years ago)
- Last Synced: 2025-10-27T10:35:47.005Z (5 months ago)
- Topics: aria2, client, python, rpc, xmlrpc-client
- Language: Python
- Homepage:
- Size: 39.1 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to using this package
## Installing
```
pip install aria2_rpc_client
```
## Using
```python
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
```