Expand description
By default, all settings are loaded from files located under your home directory in the
.qcs folder. Within that folder:
settings.tomlwill be used to load general settings (e.g. which URLs to connect to).secrets.tomlwill be used to load tokens for authentication.
Both files should contain profiles. Your settings should contain a default_profile_name
that determines which profile is loaded when no other profile is explicitly provided.
If you don’t have either of these files, see the QCS credentials guide for details on how to obtain them.
You can use environment variables to override values in your configuration:
- [
SETTINGS_PATH_VAR]: Set the path of thesettings.tomlfile to load. - [
SECRETS_PATH_VAR]: Set the path of thesecrets.tomlfile to load. - [
SECRETS_READ_ONLY_VAR]: Flag indicating whether to treat thesecrets.tomlfile as read-only. Disabled by default.- Access token updates will not be persisted to the secrets file, regardless of file permissions, for any of the following values (case insensitive): “true”, “yes”, “1”.
- Access token updates will be persisted to the secrets file if it is writeable for any other value or if unset.
PROFILE_NAME_VAR: Override the profile that is loaded by defaultQUILC_URL_VAR: Override the URL used for requests to the quilc server.QVM_URL_VAR: Override the URL used for requests to the QVM server.API_URL_VAR: Override the URL used for requests to the QCS REST API server.GRPC_API_URL_VAR: Override the URL used for requests to the QCS gRPC API.
The ClientConfiguration exposes an API for loading and accessing your
configuration.
Modules§
- secrets
- Models and utilities for managing QCS secret credentials.
- settings
- Models and utilities for managing QCS settings.
- tokens
- Models and utilities for managing
OAuth2sessions.
Structs§
- Client
Configuration - A configuration suitable for use as a QCS API Client.
- Client
Configuration Builder - Builder for
ClientConfiguration.
Enums§
- Client
Configuration Builder Error - Error type for ClientConfigurationBuilder
- Config
Source - Describes how a
ClientConfigurationwas initialized. - Load
Error - Errors that can occur when loading a configuration.
- Token
Error - Errors that can occur when managing authorization tokens.
Constants§
- API_
URL_ VAR - Setting this environment variable will override the URL used to connect to the QCS REST API.
- DEFAULT_
API_ URL - Default URL to access the QCS API.
- DEFAULT_
GRPC_ API_ URL - Default URL to access the gRPC API.
- DEFAULT_
PROFILE_ NAME - Default profile name.
- DEFAULT_
QUILC_ URL - Default URL to access
quilc. - DEFAULT_
QVM_ URL - Default URL to access QVM.
- GRPC_
API_ URL_ VAR - Setting this environment variable will override the URL used to connect to the GRPC server.
- PROFILE_
NAME_ VAR - Setting this environment variable will change which profile is used from the loaded config files
- QUILC_
URL_ VAR - Setting this environment variable will override the URL used to access quilc.
- QVM_
URL_ VAR - Setting this environment variable will override the URL used to access the QVM.