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
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
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())
Metadata
Release files for aio-nano 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aio-nano-0.1.9.tar.gz | 11.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aio_nano-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.8 kB
Release files / aio-nano-0.1.9.tar.gz
| Download URL | aio-nano-0.1.9.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3fa17d57053335a811dd763de48beb8525ff8669098f1edada68095209dacd4c
|
|
BLAKE2b-256 checksum How to use checksums |
940deb3a91f79de6b2aa89a51561935c55b75a91a98fb3b13e4f58843825f8f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.10.4 Linux/5.19.0-76051900-generic
|
Release files / aio_nano-0.1.9-py3-none-any.whl
| Download URL | aio_nano-0.1.9-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24cdbe22860f5de9f0f5f449dee09008cfe048c3c094f643b24081ea319289b0
|
|
BLAKE2b-256 checksum How to use checksums |
1e223008937a55a915fda7cb0e425104caf369123ad602e237326295c2328e52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.10.4 Linux/5.19.0-76051900-generic
|