netlab.async_client
NetlabClient
is the main entrypoint to the NETLAB+ SDK.
Only NetlabClient
should be created directly. See the mixin classes for a full list
of methods:
Usage
async with NetlabClient() as client:
client: NetlabConnection
status = await client.system_status_get()
Classes
|
Used to collect events from a netlab subscription. |
|
Used to create an event stream. |
|
Async Context Manager for creating connections to NETLAB+. |
|
An active connection to a NETLAB+ used to communicate with it. |
- class netlab.async_client.NetlabClient(system='default', config=None, config_path=None)
Async Context Manager for creating connections to NETLAB+.
- Parameters:
system (str | None) – The name to identify a NETLAB+ system. Defaults to ‘default’.
config (None | NetlabServerConfig | Dict[str, Any]) – Configuration options. See below for all possible options for the
config
.config_path (str | None) – File path location of a JSON config file to be used instead of the default location.
- class netlab.async_client.NetlabConnection(reader, writer, config)
An active connection to a NETLAB+ used to communicate with it. Should only be created by a
NetlabClient
.