Skip to main content

init

Initialize the Flyte system with the given configuration. This method should be called before any other Flyte remote API methods are called. Thread-safe implementation.

def init(
org: 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,
reset_root_logger: bool = False,
endpoint: str | None = None,
headless: bool = False,
insecure: bool = False,
insecure_skip_verify: bool = False,
ca_cert_file_path: str | None = None,
auth_type: AuthType = "Pkce",
command: List[str] | None = None,
proxy_command: List[str] | None = None,
api_key: str | None = None,
client_id: str | None = None,
client_credentials_secret: str | None = None,
auth_client_config: ClientConfig | None = None,
rpc_retries: int = 3,
http_proxy_url: str | None = None,
disable_keyring: bool = False,
storage: Storage | None = None,
batch_size: int = 1000,
image_builder: ImageBuildEngine.ImageBuilderType = "local",
images: typing.Dict[str, str] | None = None,
source_config_path: Optional[Path] = None,
sync_local_sys_paths: bool = True,
load_plugin_type_transformers: bool = True,
local_persistence: bool = False
) - > None

Initialize the Flyte system with the given configuration. This method should be called before any other Flyte remote API methods are called. Thread-safe implementation.

Parameters

NameTypeDescription
org`strNone` = None
project`strNone` = None
domain`strNone` = None
root_dir`PathNone` = None
log_level`intNone` = None
log_format`LogFormatNone` = None
reset_root_loggerbool = FalseBy default, we clear out root logger handlers and set up our own.
endpoint`strNone` = None
headlessbool = FalseOptional Whether to run in headless mode
insecurebool = Falseinsecure flag for the client
insecure_skip_verifybool = FalseWhether to skip SSL certificate verification
ca_cert_file_path`strNone` = None
auth_typeAuthType = "Pkce"The authentication type to use (Pkce, ClientSecret, ExternalCommand, DeviceFlow)
command`List[str]None` = None
proxy_command`List[str]None` = None
api_key`strNone` = None
client_id`strNone` = None
client_credentials_secret`strNone` = None
auth_client_config`ClientConfigNone` = None
rpc_retriesint = 3[optional] int Number of times to retry the platform calls
http_proxy_url`strNone` = None
disable_keyringbool = FalseDisable storage of tokens in local keyring.
storage`StorageNone` = None
batch_sizeint = 1000Optional batch size for operations that use listings, defaults to 1000, so limit larger than batch_size will be split into multiple requests.
image_builderImageBuildEngine.ImageBuilderType = "local"Optional image builder configuration, if not provided, the default image builder will be used.
images`typing.Dict[str, str]None` = None
source_config_pathOptional[Path] = NoneOptional path to the source configuration file (This is only used for documentation)
sync_local_sys_pathsbool = TrueWhether to include and synchronize local sys.path entries under the root directory into the remote container (default: True).
load_plugin_type_transformersbool = TrueIf enabled (default True), load the type transformer plugins registered under the "flyte.plugins.types" entry point group.
local_persistencebool = FalseWhether to enable SQLite persistence for local run metadata (default: False).

Returns

TypeDescription
None