nyx_client.configuration

SDK configuration classes.

Classes

BaseNyxConfig

Configuration for the Nyx client.

ConfigType

Nyx configuration types.

NyxConfigExtended

Extended configuration for Nyx client with API integration.

Module Contents

class nyx_client.configuration.BaseNyxConfig

Configuration for the Nyx client.

nyx_url

The URL of the Nyx instance.

nyx_email

The email of the Nyx user.

nyx_password

The password of the Nyx user.

override_token

Allows injection of JWT token

classmethod from_env(env_file=None, override_token=None)

Create a BaseNyxConfig instance from environment variables.

Parameters:
  • env_file (str | None) – Path to the environment file.

  • override_token (str | None) – Token to override the default authentication.

Returns:

A new BaseNyxConfig instance.

Raises:

OSError – If required environment variables are not set.

__str__()

Return a string representation of the configuration.

Returns:

A JSON string of the configuration.

property nyx_auth: dict

Get the authentication credentials.

Returns:

A dictionary containing email and password for authentication.

Return type:

dict

class nyx_client.configuration.ConfigType

Bases: str, enum.Enum

Nyx configuration types.

class nyx_client.configuration.NyxConfigExtended

Extended configuration for Nyx client with API integration.

api_key

The API key for the selected provider.

provider

The type of configuration provider.

base_config

The base Nyx configuration.

classmethod from_env(provider, env_file=None, override_token=None)

Create a NyxConfigExtended instance from environment variables.

Parameters:
  • provider (ConfigType) – The type of configuration provider.

  • env_file (str | None) – Path to the environment file.

  • override_token (str | None) – Token to override the default authentication.

Returns:

A new NyxConfigExtended instance.

Raises:

Exception – If an unsupported config type is provided.