nyx_client.configuration ======================== .. py:module:: nyx_client.configuration .. autoapi-nested-parse:: SDK configuration classes. Classes ------- .. autoapisummary:: nyx_client.configuration.BaseNyxConfig nyx_client.configuration.ConfigType nyx_client.configuration.NyxConfigExtended Module Contents --------------- .. py:class:: BaseNyxConfig Configuration for the Nyx client. .. py:attribute:: nyx_url :type: str The URL of the Nyx instance. .. py:attribute:: nyx_password :type: str The email of the Nyx user. .. py:attribute:: nyx_email :type: str The password of the Nyx user. .. py:attribute:: override_token :type: str | None :value: None Allows injection of JWT token .. py:method:: from_env(env_file = '.env', override_token = None) :classmethod: Create a BaseNyxConfig instance from environment variables. :param env_file: Relative (to the working directory) or absolute path to the environment file. :param override_token: Token to override the default authentication. :returns: A new `BaseNyxConfig` instance. :raises ValueError: If a required variable is not set in the env file or the file does not exist. .. py:method:: __str__() Return a string representation of the configuration. :returns: A JSON string of the configuration. .. py:property:: nyx_auth :type: dict Get the authentication credentials. :returns: A dictionary containing email and password for authentication. .. py:class:: ConfigType Bases: :py:obj:`str`, :py:obj:`enum.Enum` Nyx configuration types. .. py:class:: NyxConfigExtended Extended configuration for Nyx client with API integration. .. py:attribute:: api_key :type: str The API key for the selected provider. .. py:attribute:: provider :type: ConfigType The type of configuration provider. .. py:attribute:: base_config :type: BaseNyxConfig The base Nyx configuration. .. py:method:: from_env(provider, env_file = '.env', override_token = None) :classmethod: Create a NyxConfigExtended instance from environment variables. :param provider: The type of configuration provider. :param env_file: Relative (to the working directory) or absolute path to the environment file. :param override_token: Token to override the default authentication. :returns: A new `NyxConfigExtended` instance. :raises ValueError: If a required variable is not set in the env file, the env file does not exist or the corresponding `api_key` env var is not set.