Config object#
- 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), generic=GenericPersistenceConfig(attach_execution_metadata=True)), local_sandbox_path='/tmp/flytedml8uz3b')#
This the parent configuration object and holds all the underlying configuration object types. An instance of this object holds all the config necessary to
Interactive session with Union backend
Some parts are required for Serialization, for example Platform Config is not required
Runtime of a task
- Args:
- 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.
- Parameters:
platform (PlatformConfig)
secrets (SecretsConfig)
stats (StatsConfig)
data_config (DataConfig)
local_sandbox_path (str)
- classmethod auto(config_file=None)#
- Automatically constructs the Config Object. The order of precedence is as follows
first try to find any env vars that match the config vars specified in the FLYTE_CONFIG format.
If not found in environment then values ar read from the config file
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:
- classmethod for_endpoint(endpoint, insecure=False, data_config=None, config_file=None)#
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)
- Return type: