flytekit.configuration.Config

class flytekit.configuration.Config(platform=PlatformConfig(endpoint='localhost:30080', insecure=False, insecure_skip_verify=False, ca_cert_file_path=None, console_endpoint=None, command=None, proxy_command=None, client_id=None, client_credentials_secret=None, scopes=[], auth_mode=<AuthType.STANDARD: 'standard'>, audience=None, rpc_retries=3, http_proxy_url=None), 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), azure=AzureBlobStorageConfig(account_name=None, account_key=None, tenant_id=None, client_id=None, client_secret=None)), local_sandbox_path='/tmp/flytehtfzxeb0')[source]

This 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:
  • entrypoint_settings – EntrypointSettings object for use with Spark tasks. If supplied, this will be used when serializing Spark tasks, which need to know the path to the flytekit entrypoint.py file, inside the container.

  • platform (PlatformConfig)

  • secrets (SecretsConfig)

  • stats (StatsConfig)

  • data_config (DataConfig)

  • local_sandbox_path (str)

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 (str | ConfigFile | None) – file path to read the config from, if not specified default locations are searched

Returns:

Config

Return type:

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:
  • endpoint (str)

  • insecure (bool)

  • data_config (DataConfig | None)

  • config_file (str | ConfigFile | None)

Return type:

Config

classmethod for_sandbox()[source]

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

Return type:

Config

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

Config

Attributes

data_config: 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), azure=AzureBlobStorageConfig(account_name=None, account_key=None, tenant_id=None, client_id=None, client_secret=None))
local_sandbox_path: str = '/tmp/flytehtfzxeb0'
platform: PlatformConfig = PlatformConfig(endpoint='localhost:30080', insecure=False, insecure_skip_verify=False, ca_cert_file_path=None, console_endpoint=None, command=None, proxy_command=None, client_id=None, client_credentials_secret=None, scopes=[], auth_mode=<AuthType.STANDARD: 'standard'>, audience=None, rpc_retries=3, http_proxy_url=None)
secrets: SecretsConfig = SecretsConfig(env_prefix='_FSEC_', default_dir='/etc/secrets', file_prefix='')
stats: StatsConfig = StatsConfig(host='localhost', port=8125, disabled=False, disabled_tags=False)