https://github.com/synodriver/aiodeluge
deluge client in asyncio which implement low-level protocol
https://github.com/synodriver/aiodeluge
Last synced: about 1 year ago
JSON representation
deluge client in asyncio which implement low-level protocol
- Host: GitHub
- URL: https://github.com/synodriver/aiodeluge
- Owner: synodriver
- Created: 2023-03-12T15:30:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-12T03:37:33.000Z (about 3 years ago)
- Last Synced: 2024-04-29T04:43:46.393Z (about 2 years ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
✨ aiodeluge ✨
An asyncio deluge client talk to deluge
[](https://pypi.org/project/aiodeluge/)





### Usage
```python
import asyncio
from aiodeluge import Client
async def main():
async with Client(timeout=10) as client:
print(
await client.send_request(
"daemon.login", "synodriver", "123456", client_version="2.1.1"
)
)
print(await client.send_request("core.get_auth_levels_mappings"))
print(await client.send_request("core.get_external_ip"))
print(await client.send_request("core.get_config"))
if __name__ == "__main__":
asyncio.run(main())
```
### Public api
```python
import ssl as ssl_
from typing import Callable, Dict, Optional, Union
class Client:
host: str
port: int
username: str
password: str
event_handlers: dict
ssl: ssl_.SSLContext
timeout: Union[int, float]
def __init__(
self,
host: str = "127.0.0.1",
port: Optional[int] = 58846,
username: Optional[str] = "",
password: Optional[str] = "",
event_handlers: Optional[Dict[str, Callable]] = None,
ssl: Optional[ssl_.SSLContext] = None,
timeout: Optional[Union[int, float]] = None,
): ...
async def connect(self): ...
async def disconnect(self): ...
async def send_request(self, method: str, *args, **kwargs): ...
async def __aenter__(self): ...
async def __aexit__(self, exc_type, exc_val, exc_tb): ...
def __eq__(self, other: "Client"): ...
```