Skip to content

Configuration

Defaults

The default configuration is as follows:

  • api_server: "https://api.aiod.eu/"
  • version: "v2"
  • auth_server: "https://auth.aiod.eu/aiod-auth/"
  • realm: "aiod"
  • client_id: "aiod-sdk"

Updating the Configuration

The configuration can be updated simply by setting its attributes.

import aiod
aiod.config.version = "v3"

Updating authentication settings (e.g., auth_server, realm, or client_id) will automatically unset the token. When changing it back, the previous token is not loaded automatically. Tokens are not invalidated.

Config

Configuration for which servers and versions to use in connections.

Notes

For most users, there is generally no reason to modify these values other than version. For developers, it may be useful to connect to a test server or local instance by changing the api_server and auth_server addresses.

Attributes:

Name Type Description
version str

The version prefix to use.

api_server str

The URL of the metadata catalogue REST API.

auth_server str

The authentication server to connect to.

realm str

The realm in which the client matching the client_id resides.

client_id str

The client ID used for authentication.

load_configuration

Load a configuration from file.

Parameters:

Name Type Description Default
file Path

The TOML file that defines the configuration to load.

required

Returns:

Type Description
Config

The loaded configuration.