flytekit.configuration.Config#

class flytekit.configuration.Config(platform=PlatformConfig(endpoint='localhost:30081', insecure=False, insecure_skip_verify=False, console_endpoint=None, command=None, client_id=None, client_credentials_secret=None, scopes=[], auth_mode=<AuthType.STANDARD: 'standard'>), secrets=SecretsConfig(env_prefix='_FSEC_', default_dir='/etc/secrets', file_prefix=''), stats=StatsConfig(host='localhost', port=8125, disabled=False, disabled_tags=False), data_config=DataConfig(s3=S3Config(enable_debug=False, endpoint=None, retries=3, backoff=datetime.timedelta(seconds=5), access_key_id=None, secret_access_key=None), gcs=GCSConfig(gsutil_parallelism=False)), local_sandbox_path='/tmp/flyteranpy8in')[source]#

This is the parent configuration object and holds all the underlying configuration object types. An instance of this object holds all the config necessary to

  1. Interactive session with Flyte backend

  2. Some parts are required for Serialization, for example Platform Config is not required

  3. Runtime of a task

Parameters
Return type

None

Methods

classmethod auto(config_file=None)[source]#
Automatically constructs the Config Object. The order of precedence is as follows
  1. first try to find any env vars that match the config vars specified in the FLYTE_CONFIG format.

  2. If not found in environment then values ar read from the config file

  3. If not found in the file, then the default values are used.

Parameters

config_file (Optional[Union[str, flytekit.configuration.file.ConfigFile]]) – file path to read the config from, if not specified default locations are searched

Returns

Config

Return type

flytekit.configuration.Config

classmethod for_endpoint(endpoint, insecure=False, data_config=None, config_file=None)[source]#

Creates an automatic config for the given endpoint and uses the config_file or environment variable for default. Refer to Config.auto() to understand the default bootstrap behavior.

data_config can be used to configure how data is downloaded or uploaded to a specific Blob storage like S3 / GCS etc. But, for permissions to a specific backend just use Cloud providers reqcommendation. If using fsspec, then refer to fsspec documentation :param endpoint: -> Endpoint where Flyte admin is available :param insecure: -> if the connection should be insecure, default is secure (SSL ON) :param data_config: -> Data config, if using specialized connection params like minio etc :param config_file: -> Optional config file in the flytekit config format. :return: Config

Parameters
Return type

flytekit.configuration.Config

classmethod for_sandbox()[source]#

Constructs a new Config object specifically to connect to Deploy Flyte Sandbox on Your Local Machine. If you are using a hosted Sandbox like environment, then you may need to use port-forward or ingress urls :return: Config

Return type

flytekit.configuration.Config

with_params(platform=None, secrets=None, stats=None, data_config=None, local_sandbox_path=None)[source]#
Parameters
Return type

flytekit.configuration.Config

Attributes

data_config: flytekit.configuration.DataConfig = DataConfig(s3=S3Config(enable_debug=False, endpoint=None, retries=3, backoff=datetime.timedelta(seconds=5), access_key_id=None, secret_access_key=None), gcs=GCSConfig(gsutil_parallelism=False))#
local_sandbox_path: str = '/tmp/flyteranpy8in'#
platform: flytekit.configuration.PlatformConfig = PlatformConfig(endpoint='localhost:30081', insecure=False, insecure_skip_verify=False, console_endpoint=None, command=None, client_id=None, client_credentials_secret=None, scopes=[], auth_mode=<AuthType.STANDARD: 'standard'>)#
secrets: flytekit.configuration.SecretsConfig = SecretsConfig(env_prefix='_FSEC_', default_dir='/etc/secrets', file_prefix='')#
stats: flytekit.configuration.StatsConfig = StatsConfig(host='localhost', port=8125, disabled=False, disabled_tags=False)#