class ClientConfig: (source)
Constructors: ClientConfig.from_dict(d)
, ClientConfig.load(config_source, disable_file, config_file_strict, override_env_vars)
Client configuration loaded from TOML and environment variables.
This contains a mapping of profile names to client profiles. Use
ClientConfigProfile.to_connect_config
to create a ClientConnectConfig
from a profile. See load_profile
to load an individual profile.
Warning
Experimental API.
Static Method | from |
Create a ClientConfig from a dictionary. |
Static Method | load |
Load all client profiles from given sources. |
Static Method | load |
Load a single client profile and convert to connect config. |
Method | to |
Convert to a dictionary that can be used for TOML serialization. |
Class Variable | profiles |
Map of profile name to its corresponding ClientConfigProfile. |
def load(*, config_source:
DataSource | None
= None, disable_file: bool
= False, config_file_strict: bool
= False, override_env_vars: Mapping[ str, str] | None
= None) -> ClientConfig
:
(source)
¶
Load all client profiles from given sources.
This does not apply environment variable overrides to the profiles, it
only uses an environment variable to find the default config file path
(TEMPORAL_CONFIG_FILE). To get a single profile with environment variables
applied, use ClientConfigProfile.load
.
Parameters | |
configDataSource | None | If present, this is used as the configuration source instead of default file locations. This can be a path to the file or the string/byte contents of the file. |
disablebool | If true, file loading is disabled. This is only used when config_source is not present. |
configbool | If true, will TOML file parsing will error on unrecognized keys. |
overrideMapping[ | The environment variables to use for locating the default config file. If not provided, the current process's environment is used to check for TEMPORAL_CONFIG_FILE. To use a specific set of environment variables, provide them here. To disable environment variable loading, set disable_file to true or pass an empty dictionary for this parameter. |
Returns | |
ClientConfig | Undocumented |
def load_client_connect_config(profile:
str
= 'default', *, config_file: str | None
= None, disable_file: bool
= False, disable_env: bool
= False, config_file_strict: bool
= False, override_env_vars: Mapping[ str, str] | None
= None) -> ClientConnectConfig
:
(source)
¶
Load a single client profile and convert to connect config.
This is a convenience function that combines loading a profile and converting it to a connect config dictionary. This will use the current process's environment for overrides unless disabled.
Parameters | |
profile:str | The profile to load from the config. Defaults to "default". |
configstr | None | Path to a specific TOML config file. If not provided, default file locations are used. This is ignored if disable_file is true. |
disablebool | If true, file loading is disabled. |
disablebool | If true, environment variable loading and overriding is disabled. |
configbool | If true, will error on unrecognized keys in the TOML file. |
overrideMapping[ | A dictionary of environment variables to use for loading and overrides. If not provided, the current process's environment is used. To use a specific set of environment variables, provide them here. To disable environment variable loading, set disable_env to true. |
Returns | |
ClientConnectConfig | TypedDict of keyword arguments for
temporalio.client.Client.connect . |