qcs_sdk.client
A client providing helper functionality for accessing QCS APIs
Create a QCSClient configuration using an environment-based configuration.
Parameters
profile_name: The QCS setting's profile name to use. IfNone, the default value configured in your environment is used.
Raises
LoadClientError: If there is an issue loading the profile details from the environment.
Create a QCSClient configuration using an environment-based configuration.
If credentials are not found or stale, a PKCE login redirect flow will be initialized.
Note that this opens up a TCP port on your system to accept a browser HTTP redirect,
so you should not use this in environments where that is not possible,
such as hosted JupyterLab sessions.
Parameters
profile_name: The QCS setting's profile name to use. IfNone, the default value configured in your environment is used.
Raises
LoadClientError: If there is an issue loading the profile details from the environment or if the PKCE login flow fails.
See the QCS documentation for more details.
Create a QCSClient configuration using an environment-based configuration.
If credentials are not found or stale, a PKCE login redirect flow will be initialized.
Note that this opens up a TCP port on your system to accept a browser HTTP redirect,
so you should not use this in environments where that is not possible,
such as hosted JupyterLab sessions.
Parameters
profile_name: The QCS setting's profile name to use. IfNone, the default value configured in your environment is used.
Raises
LoadClientError: If there is an issue loading the profile details from the environment or if the PKCE login flow fails.
See the QCS documentation for more details.
Manages the OAuth2 authorization process and token lifecycle for accessing the QCS API.
This struct encapsulates the necessary information to request an access token
from an authorization server, including the OAuth2 grant type and any associated
credentials or payload data.
Fields
payload- TheOAuth2grant type and associated data that will be used to request an access token.access_token- The access token currently in use, if any. If no token has been provided or requested yet, this will beNone.auth_server- The authorization server responsible for issuing tokens.
OAuth 2.0 authorization server.
OAuth 2.0 issuer URL.
This is the base URL of the identity provider.
For Okta, this usually looks like https://example.okta.com/oauth2/default.
For Cognito, it might look like https://cognito-idp.us-west-2.amazonaws.com/us-west-2_example.
Note that this is technically distinct from the issuer field in [OidcDiscovery],
which is the canonical URI that the identity provider uses to sign and validate tokens,
but the OpenID specification requires that they match exactly,
and that they match the iss claim in Tokens issued by this identity provider.
OAuth 2.0 scopes to request during authorization requests.
If not specified, supported_scopes from the discovery document hosted at issuer will be used.
The scope openid is always requested, even if not present in this list.
A single type containing an access token and an associated refresh token.
An [OAuth 2.0 refresh token][https://oauth.net/2/refresh-tokens/] that is used to obtain a new [SecretAccessToken].
A pair of Client ID and Client Secret, used to request an OAuth Client Credentials Grant
A struct that manages access tokens by utilizing a user-provided refresh function.
The [ExternallyManaged] struct allows users to define custom logic for
fetching or refreshing access tokens.
Errors encountered while building the QCS API client configuration manually.
Errors encountered while interacting with a QCS API client.
Errors when compiling with RPCQ client.
Errors that can occur when managing authorization tokens.
Errors encountered while loading the QCS API client configuration from the environment configuration.