qilisdk.settings

Classes

Precision

str(object='') -> str

QiliSDKSettings

Environment-based configuration settings for QiliSDK.

Functions

default_logging_config_path(→ pathlib.Path)

get_settings(→ QiliSDKSettings)

Returns a singleton instance of QiliSDKSettings.

Module Contents

default_logging_config_path() pathlib.Path[source]
class Precision[source]

Bases: str, enum.Enum

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to ‘utf-8’. errors defaults to ‘strict’.

Initialize self. See help(type(self)) for accurate signature.

COMPLEX_64 = 'COMPLEX_64'[source]
COMPLEX_128 = 'COMPLEX_128'[source]
class QiliSDKSettings(_case_sensitive: bool | None = None, _nested_model_default_partial_update: bool | None = None, _env_prefix: str | None = None, _env_prefix_target: pydantic_settings.sources.EnvPrefixTarget | None = None, _env_file: pydantic_settings.sources.DotenvType | None = ENV_FILE_SENTINEL, _env_file_encoding: str | None = None, _env_ignore_empty: bool | None = None, _env_nested_delimiter: str | None = None, _env_nested_max_split: int | None = None, _env_parse_none_str: str | None = None, _env_parse_enums: bool | None = None, _cli_prog_name: str | None = None, _cli_parse_args: bool | list[str] | tuple[str, ...] | None = None, _cli_settings_source: pydantic_settings.sources.CliSettingsSource[Any] | None = None, _cli_parse_none_str: str | None = None, _cli_hide_none_type: bool | None = None, _cli_avoid_json: bool | None = None, _cli_enforce_required: bool | None = None, _cli_use_class_docs_for_groups: bool | None = None, _cli_show_env_vars: bool | None = None, _cli_exit_on_error: bool | None = None, _cli_prefix: str | None = None, _cli_flag_prefix_char: str | None = None, _cli_implicit_flags: bool | Literal['dual', 'toggle'] | None = None, _cli_ignore_unknown_args: bool | None = None, _cli_kebab_case: bool | Literal['all', 'no_enums'] | None = None, _cli_shortcuts: collections.abc.Mapping[str, str | list[str]] | None = None, _secrets_dir: pydantic_settings.sources.PathType | None = None, _build_sources: tuple[tuple[pydantic_settings.sources.PydanticBaseSettingsSource, ...], dict[str, Any]] | None = None, **values: Any)[source]

Bases: pydantic_settings.BaseSettings

Environment-based configuration settings for QiliSDK.

These settings are automatically loaded from environment variables prefixed with QILISDK_, or from a local .env file if present.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

arithmetic_precision: Precision = None[source]
logging_config_path: pathlib.Path = None[source]
speqtrum_username: str | None = None[source]
speqtrum_apikey: str | None = None[source]
speqtrum_api_url: str = None[source]
speqtrum_audience: str = None[source]
get_settings() QiliSDKSettings[source]

Returns a singleton instance of QiliSDKSettings.

This function caches the parsed environment-based settings to avoid redundant re-parsing across the application lifecycle.

Returns:

The cached configuration object populated from environment variables.

Return type:

QiliSDKSettings