class documentation

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_dict Create a ClientConfig from a dictionary.
Static Method load Load all client profiles from given sources.
Static Method load_client_connect_config Load a single client profile and convert to connect config.
Method to_dict Convert to a dictionary that can be used for TOML serialization.
Class Variable profiles Map of profile name to its corresponding ClientConfigProfile.

Create a ClientConfig from a dictionary.

@staticmethod
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
config_source:DataSource | NoneIf 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.
disable_file:boolIf true, file loading is disabled. This is only used when config_source is not present.
config_file_strict:boolIf true, will TOML file parsing will error on unrecognized keys.
override_env_vars:Mapping[str, str] | NoneThe 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
ClientConfigUndocumented
@staticmethod
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:strThe profile to load from the config. Defaults to "default".
config_file:str | NonePath to a specific TOML config file. If not provided, default file locations are used. This is ignored if disable_file is true.
disable_file:boolIf true, file loading is disabled.
disable_env:boolIf true, environment variable loading and overriding is disabled.
config_file_strict:boolIf true, will error on unrecognized keys in the TOML file.
override_env_vars:Mapping[str, str] | NoneA 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
ClientConnectConfigTypedDict of keyword arguments for temporalio.client.Client.connect.

Convert to a dictionary that can be used for TOML serialization.

Map of profile name to its corresponding ClientConfigProfile.