NodeAsync#
- class pyaseba.client.NodeAsync(cached: bool = False)#
Asynchronous alternative to
pyaseba.client.Nodebased onpyaseba.client.ClientAsync.Replaces methods that blocks (and typically takes
wait_ms: intas argument) with coroutines, like for example>>> node = Node() >>> await node.connect("tcp:port=33333") True
>>> node.set("value", [1, 2, 3]) >>> await node.get("value") [1, 2, 3]
>>> await node.wait("e") True
>>> await node.close()
The reset of the interface is identical to
pyaseba.client.Node.- async close(reset: bool = False) None#
Asynchronous version of
pyaseba.client.Node.close()
- async connect(client: ClientAsync | None = None, target: str = '', wait_ms: int = 1000, max_retries: int = 3, node_id: int = -1, start_mirroring: bool = False) bool#
Asynchronous version of
pyaseba.client.Node.connect()
- async get(name: str, wait_ms: int = 0, cached: bool | None = None) int | list[int] | None#
Asynchronous version of
pyaseba.client.Node.get()
- async get_all(wait_ms: int = 1000, cached: bool | None = None) dict[str, list[int]]#
Asynchronous version of
pyaseba.client.Node.get_all()
- set_callback(name: str, callback: MaybeAsyncCallback[Self] | None) None#
Version of
pyaseba.client.Node.set_callback()that accept coroutines as callbacks too.
- async update(wait_ms: int = 1000) None#
Asynchronous version of
pyaseba.client.Node.update()
- async wait(name: str, wait_ms: int = 0) bool#
Asynchronous version of
pyaseba.client.Node.wait()