aio-nano-0.1.9
توضیحات
An asynchronous nano currency library
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | aio-nano-0.1.9 |
| نام | aio-nano |
| نسخه کتابخانه | 0.1.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Teslim Olunlade |
| ایمیل نویسنده | tolunlade@outlook.com |
| آدرس صفحه اصلی | https://github.com/ogtega/aio-nano |
| آدرس اینترنتی | https://pypi.org/project/aio-nano/ |
| مجوز | MIT |
# aio-nano
## Overview
This library contains an asynchronous python RPC client for Nano nodes, allowing you to more easily develop on the Nano network with fully type annnotated methods and responses.
## Installation
### PIP
`pip install aio-nano`
### Poetry
`poetry add aio-nano`
## Example Async HTTP RPC Call
```python
from aio_nano import Client
import asyncio
async def main():
api_key = ...
client = Client('https://mynano.ninja/api/node', {'Authorization': api_key})
supply = await client.available_supply()
print(supply)
asyncio.run(main())
```
## Example Async WebSocket RPC Subscription
```python
import asyncio
from time import time
from aio_nano import WSClient
async def main():
ws = await WSClient("ws://localhost:7078").connect()
start = time() * 1000
await ws.subscribe("confirmation", lambda x: print(x), ack=True)
print(f"Acked in {time() * 1000 - start}ms")
await asyncio.Future()
asyncio.run(main())
```
نیازمندی
| مقدار | نام |
|---|---|
| >=3.8.1,<4.0.0 | aiohttp |
| >=1.9.1,<2.0.0 | pydantic |
| >=10.3,<11.0 | websockets |
| >=0.19.0,<0.20.0 | pytest-asyncio |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10,<4.0 | Python |
نحوه نصب
نصب پکیج whl aio-nano-0.1.9:
pip install aio-nano-0.1.9.whl
نصب پکیج tar.gz aio-nano-0.1.9:
pip install aio-nano-0.1.9.tar.gz