Skip to main content

init_from_api_key

Initialize the Flyte system using an API key for authentication. This is a convenience method for API key-based authentication. Thread-safe implementation.

def init_from_api_key(
api_key: str | None = None,
project: str | None = None,
domain: str | None = None,
root_dir: Path | None = None,
log_level: int | None = None,
log_format: LogFormat | None = None,
storage: Storage | None = None,
batch_size: int = 1000,
image_builder: ImageBuildEngine.ImageBuilderType = "local",
images: typing.Dict[str, str] | None = None,
sync_local_sys_paths: bool = True
) - > None

Initialize the Flyte system using an API key for authentication. This is a convenience method for API key-based authentication. Thread-safe implementation. The API key should be an encoded API key that contains the endpoint, client ID, client secret, and organization information. You can obtain this encoded API key from your Flyte administrator or cloud provider.

Parameters

NameTypeDescription
api_key`strNone` = None
project`strNone` = None
domain`strNone` = None
root_dir`PathNone` = None
log_level`intNone` = None
log_format`LogFormatNone` = None
storage`StorageNone` = None
batch_sizeint = 1000Optional batch size for operations that use listings, defaults to 1000
image_builderImageBuildEngine.ImageBuilderType = "local"Optional image builder configuration
images`typing.Dict[str, str]None` = None
sync_local_sys_pathsbool = TrueWhether to include and synchronize local sys.path entries under the root directory into the remote container (default: True)

Returns

TypeDescription
NoneNone