Client Interface ================ Creating a client ----------------- .. autoclass:: netlab.client.Client :members: Config JSON, dictionary, and environment variables -------------------------------------------------- .. py:attribute:: config The following parameters are used by **config.json** and the dictionary passed directly when instantiating the :class:`netlab.client.Client`. :param host: IP Address or hostname of remote NETLAB+ API. Defaults to ``'localhost'``. :type host: str :param user: User account ID from NETLAB+ system. :type user: str :param token: Token obtained from NETLAB+ system. :type token: str :param port: Port of remote NETLAB+ API. Defaults to ``9000``. :type port: int :param timeout: The amount of time in seconds of no response from the socket before it will close. Defaults to ``10``. :type timeout: int Example: .. code-block:: python config = { "host": "192.168.1.10", "user": "administrator", "token": "S25GWP5P2247CMRDNLTCNKATT49KSGEDDPXMTM6A", "port": 9000, "timeout": 10 } .. py:data:: config_env Each of the above configuration options can be specified as environment variables: .. envvar:: NETLAB_CONFIG_HOST IP Address or hostname of remote NETLAB+ API. .. envvar:: NETLAB_CONFIG_USER User account ID from NETLAB+ system. .. envvar:: NETLAB_CONFIG_TOKEN Token obtained from NETLAB+ system. .. envvar:: NETLAB_CONFIG_PORT Port of remote NETLAB+ API. .. envvar:: NETLAB_CONFIG_TIMEOUT The amount of time in seconds of no response from the socket before it will close.