<h1 align="center"><i>✨ aiodeluge ✨ </i></h1>
<h3 align="center">An asyncio deluge client talk to <a href="https://github.com/deluge-torrent/deluge">deluge</a> </h3>
[![pypi](https://img.shields.io/pypi/v/aiodeluge.svg)](https://pypi.org/project/aiodeluge/)
![python](https://img.shields.io/pypi/pyversions/aiodeluge)
![implementation](https://img.shields.io/pypi/implementation/aiodeluge)
![wheel](https://img.shields.io/pypi/wheel/aiodeluge)
![license](https://img.shields.io/github/license/synodriver/aiodeluge.svg)
![action](https://img.shields.io/github/workflow/status/synodriver/aiodeluge/build%20wheel)
### 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"): ...
```
Raw data
{
"_id": null,
"home_page": "https://github.com/synodriver/aiodeluge",
"name": "aiodeluge",
"maintainer": "v-vinson",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "asyncio,deluge",
"author": "synodriver",
"author_email": "diguohuangjiajinweijun@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c7/3c/27630edeabc067598f8109fd85251f584a94d733aac51f163476421f3469/aiodeluge-0.1.0.tar.gz",
"platform": null,
"description": "<h1 align=\"center\"><i>\u2728 aiodeluge \u2728 </i></h1>\n\n<h3 align=\"center\">An asyncio deluge client talk to <a href=\"https://github.com/deluge-torrent/deluge\">deluge</a> </h3>\n\n\n\n[![pypi](https://img.shields.io/pypi/v/aiodeluge.svg)](https://pypi.org/project/aiodeluge/)\n![python](https://img.shields.io/pypi/pyversions/aiodeluge)\n![implementation](https://img.shields.io/pypi/implementation/aiodeluge)\n![wheel](https://img.shields.io/pypi/wheel/aiodeluge)\n![license](https://img.shields.io/github/license/synodriver/aiodeluge.svg)\n![action](https://img.shields.io/github/workflow/status/synodriver/aiodeluge/build%20wheel)\n\n### Usage\n```python\nimport asyncio\n\nfrom aiodeluge import Client\n\nasync def main():\n async with Client(timeout=10) as client:\n print(\n await client.send_request(\n \"daemon.login\", \"synodriver\", \"123456\", client_version=\"2.1.1\"\n )\n )\n print(await client.send_request(\"core.get_auth_levels_mappings\"))\n print(await client.send_request(\"core.get_external_ip\"))\n print(await client.send_request(\"core.get_config\"))\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n\n### Public api\n```python\nimport ssl as ssl_\nfrom typing import Callable, Dict, Optional, Union\n\nclass Client:\n host: str\n port: int\n username: str\n password: str\n event_handlers: dict\n ssl: ssl_.SSLContext\n timeout: Union[int, float]\n \n def __init__(\n self,\n host: str = \"127.0.0.1\",\n port: Optional[int] = 58846,\n username: Optional[str] = \"\",\n password: Optional[str] = \"\",\n event_handlers: Optional[Dict[str, Callable]] = None,\n ssl: Optional[ssl_.SSLContext] = None,\n timeout: Optional[Union[int, float]] = None,\n ): ...\n \n async def connect(self): ...\n async def disconnect(self): ...\n async def send_request(self, method: str, *args, **kwargs): ...\n async def __aenter__(self): ...\n async def __aexit__(self, exc_type, exc_val, exc_tb): ...\n def __eq__(self, other: \"Client\"): ...\n\n```\n\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "An asyncio client talk to deluged",
"version": "0.1.0",
"split_keywords": [
"asyncio",
"deluge"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b8b97124a2b12432ca246d9e77204dad5026eeacf10a0127c26b04c30a8fd9ce",
"md5": "787d6ad3f40dc13353cfbd38f74c803b",
"sha256": "f29ff126e5b85c35a59e14fe9903272f6fca6e3b1e6263f6c250f8889291cfa8"
},
"downloads": -1,
"filename": "aiodeluge-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "787d6ad3f40dc13353cfbd38f74c803b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 8646,
"upload_time": "2023-03-14T07:40:44",
"upload_time_iso_8601": "2023-03-14T07:40:44.580796Z",
"url": "https://files.pythonhosted.org/packages/b8/b9/7124a2b12432ca246d9e77204dad5026eeacf10a0127c26b04c30a8fd9ce/aiodeluge-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c73c27630edeabc067598f8109fd85251f584a94d733aac51f163476421f3469",
"md5": "b6b20de8dc1a043b3e943b7234c6a6b2",
"sha256": "6f391979f7af848a9fbea9a9a244d0a9f80c63d9118fedf46ac053d98218f391"
},
"downloads": -1,
"filename": "aiodeluge-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "b6b20de8dc1a043b3e943b7234c6a6b2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8267,
"upload_time": "2023-03-14T07:40:46",
"upload_time_iso_8601": "2023-03-14T07:40:46.677805Z",
"url": "https://files.pythonhosted.org/packages/c7/3c/27630edeabc067598f8109fd85251f584a94d733aac51f163476421f3469/aiodeluge-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-14 07:40:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "synodriver",
"github_project": "aiodeluge",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "aiodeluge"
}