config
Configuration and connection management.
This module contains:
- global config helpers for runtime log-store settings
- stack-selection helpers
- runtime configuration via
kitaru.configure(...) - config precedence resolution for execution and connection settings
attributezenml_cli_utils= importlib.import_module('zenml.cli.utils')attributeKITARU_ANALYTICS_OPT_IN_ENV= _kitaru_env.KITARU_ANALYTICS_OPT_IN_ENVattributeKITARU_AUTH_TOKEN_ENV= _kitaru_env.KITARU_AUTH_TOKEN_ENVattributeKITARU_DEBUG_ENV= _kitaru_env.KITARU_DEBUG_ENVattributeKITARU_PROJECT_ENV= _kitaru_env.KITARU_PROJECT_ENVattributeKITARU_SERVER_URL_ENV= _kitaru_env.KITARU_SERVER_URL_ENVattributeKITARU_LOG_STORE_BACKEND_ENV= _config_env.KITARU_LOG_STORE_BACKEND_ENVattributeKITARU_LOG_STORE_ENDPOINT_ENV= _config_env.KITARU_LOG_STORE_ENDPOINT_ENVattributeKITARU_LOG_STORE_API_KEY_ENV= _config_env.KITARU_LOG_STORE_API_KEY_ENVattributeKITARU_STACK_ENV= _config_env.KITARU_STACK_ENVattributeKITARU_CACHE_ENV= _config_env.KITARU_CACHE_ENVattributeKITARU_RETRIES_ENV= _config_env.KITARU_RETRIES_ENVattributeKITARU_IMAGE_ENV= _config_env.KITARU_IMAGE_ENVattributeKITARU_DEFAULT_MODEL_ENV= _config_env.KITARU_DEFAULT_MODEL_ENVattributeKITARU_CONFIG_PATH_ENV= _config_env.KITARU_CONFIG_PATH_ENVattributeKITARU_MODEL_REGISTRY_ENV= _kitaru_env.KITARU_MODEL_REGISTRY_ENVattributeZENML_CONFIG_PATH_ENV= _ZENML_CONFIG_PATH_ENVattributeZENML_STORE_API_KEY_ENV= _ZENML_STORE_API_KEY_ENVattributeZENML_STORE_URL_ENV= _ZENML_STORE_URL_ENVattributeFROZEN_EXECUTION_SPEC_METADATA_KEY= _config_execution_spec.FROZEN_EXECUTION_SPEC_METADATA_KEYattributeImageSettings= _config_images.ImageSettingsattributeImageInput= _config_images.ImageInputattributeKitaruConfig= _config_core.KitaruConfigattributeResolvedExecutionConfig= _config_core.ResolvedExecutionConfigattributeResolvedConnectionConfig= _config_core.ResolvedConnectionConfigattributeActiveEnvironmentVariable= _config_core.ActiveEnvironmentVariableattributeFrozenExecutionSpec= _config_execution_spec.FrozenExecutionSpecattributeLogStoreOverride= _config_log_store.LogStoreOverrideattributeResolvedLogStore= _config_log_store.ResolvedLogStoreattributeActiveStackLogStore= _config_log_store.ActiveStackLogStoreattributeModelAliasConfig= _config_models.ModelAliasConfigattributeModelRegistryConfig= _config_models.ModelRegistryConfigattributeModelAliasEntry= _config_models.ModelAliasEntryattributeResolvedModelSelection= _config_models.ResolvedModelSelectionattributeStackInfo= _config_stacks.StackInfoattributeStackType= _config_stacks.StackTypeattributeCloudProvider= _config_stacks.CloudProviderattributeKubernetesStackSpec= _config_stacks.KubernetesStackSpecattributeVertexStackSpec= _config_stacks.VertexStackSpecattributeSagemakerStackSpec= _config_stacks.SagemakerStackSpecattributeAzureMLStackSpec= _config_stacks.AzureMLStackSpecattributeRemoteStackSpec= _config_stacks.RemoteStackSpecattributeStackComponentConfigOverrides= _config_stacks.StackComponentConfigOverridesattributeStackComponentDetails= _config_stacks.StackComponentDetailsattributeStackDetails= _config_stacks.StackDetailsattributeimage_settings_to_docker_settings= _config_images.image_settings_to_docker_settingsattributebuild_frozen_execution_spec= _config_execution_spec.build_frozen_execution_specfuncresolve_execution_config(*, decorator_overrides=None, invocation_overrides=None, start_dir=None) -> ResolvedExecutionConfigResolve execution configuration according to Phase 10 precedence.
paramdecorator_overridesKitaruConfig | None= Noneparaminvocation_overridesKitaruConfig | None= Noneparamstart_dirPath | None= NoneReturns
kitaru.config.ResolvedExecutionConfigfuncresolve_connection_config(*, explicit=None, validate_for_use=False) -> ResolvedConnectionConfigResolve connection configuration with connection-specific precedence.
Precedence (lowest to highest):
- Global ZenML-backed defaults (server_url, auth_token only)
- Environment variable overrides (KITARU_SERVER_URL, etc.)
- Runtime overrides from
kitaru.configure(project=...) - Explicit argument passed by the caller
paramexplicitKitaruConfig | None= Noneparamvalidate_for_usebool= FalseReturns
kitaru.config.ResolvedConnectionConfigfuncpersist_frozen_execution_spec(*, run_id, frozen_execution_spec) -> NonePersist a frozen execution spec as pipeline-run metadata.
paramrun_idUUID | strparamfrozen_execution_specFrozenExecutionSpecReturns
Nonefuncresolve_log_store() -> ResolvedLogStoreResolve the effective runtime log-store backend.
Returns
kitaru.config.ResolvedLogStorefuncactive_stack_log_store() -> ActiveStackLogStore | NoneReturn the runtime log-store backend from the active stack.
Returns
kitaru.config.ActiveStackLogStore | Nonefuncset_global_log_store(backend, *, endpoint, api_key=None) -> ResolvedLogStorePersist a global log-store override backend.
parambackendstrparamendpointstrparamapi_keystr | None= NoneReturns
kitaru.config.ResolvedLogStorefuncreset_global_log_store() -> ResolvedLogStoreClear the persisted global log-store override.
Returns
kitaru.config.ResolvedLogStorefuncregister_model_alias(alias, *, model, secret=None) -> ModelAliasEntryRegister or update a local model alias for kitaru.llm().
paramaliasstrparammodelstrparamsecretstr | None= NoneReturns
kitaru.config.ModelAliasEntryfunclist_model_aliases() -> list[ModelAliasEntry]List model aliases visible in the current process environment.
Returns
list[kitaru.config.ModelAliasEntry]funcresolve_model_selection(model) -> ResolvedModelSelectionResolve an explicit/default model input to a concrete model string.
parammodelstr | NoneReturns
kitaru.config.ResolvedModelSelectionfunclist_active_kitaru_environment_variables() -> list[ActiveEnvironmentVariable]Return the active public Kitaru environment variables in stable order.
Returns
list[kitaru.config.ActiveEnvironmentVariable]funccurrent_stack() -> StackInfoReturn the currently active stack.
The active stack is managed by the underlying runtime and persisted in the runtime's global user configuration.
Returns
kitaru.config.StackInfofuncclassify_stack_deployment_type(name_or_id=None) -> _config_stacks._StackShowTypeClassify a stack into Kitaru's low-cardinality deployment taxonomy.
paramname_or_idstr | None= NoneReturns
kitaru._config._stacks.kitaru._config._stacks._StackShowTypefunclist_stacks() -> list[StackInfo]List stacks visible to the current user and mark the active one.
Returns
list[kitaru.config.StackInfo]funccreate_stack(name, *, activate=True, labels=None) -> StackInfoCreate a new local stack and optionally activate it.
paramnamestrparamactivatebool= Trueparamlabelsdict[str, str] | None= NoneReturns
kitaru.config.StackInfofuncdelete_stack(name_or_id, *, recursive=False, force=False) -> NoneDelete a stack and optionally its components.
paramname_or_idstrparamrecursivebool= Falseparamforcebool= FalseReturns
Nonefuncuse_stack(name_or_id) -> StackInfoSet the active stack and return the resulting active stack info.
paramname_or_idstrStack name or stack ID.
Returns
kitaru.config.StackInfoInformation about the newly active stack.
funcconfigure(*, stack=_UNSET, image=_UNSET, cache=_UNSET, retries=_UNSET, project=_UNSET) -> KitaruConfigSet process-local runtime defaults.
Execution-level fields (stack, image, cache, retries)
update the execution precedence chain. The project field updates
the connection precedence chain and is intended as an internal /
testing escape hatch — it is not a normal user-facing setting.
paramstackstr | None | object= _UNSETDefault stack name/ID override.
paramimageImageInput | None | object= _UNSETDefault image settings override.
paramcachebool | None | object= _UNSETDefault cache behavior override.
paramretriesint | None | object= _UNSETDefault retry-count override.
paramprojectstr | None | object= _UNSETProject override (internal/testing). Set to None
to clear.
Returns
kitaru.config.KitaruConfigThe current runtime override layer after applying updates.
funcconnect(server_url, *, api_key=None, refresh=False, project=None, no_verify_ssl=False, ssl_ca_cert=None, cloud_api_url=None, timeout=None) -> NoneConnect to a Kitaru server.
Under the hood, this connects to a ZenML server and stores the resolved connection/auth state in ZenML's global user configuration.
paramserver_urlstrURL of the Kitaru server.
paramapi_keystr | None= NoneAPI key used to authenticate with the server.
paramrefreshbool= FalseForce a fresh authentication flow.
paramprojectstr | None= NoneProject name or ID to activate after connecting.
paramno_verify_sslbool= FalseDisable TLS certificate verification.
paramssl_ca_certstr | None= NonePath to a CA bundle used to verify the server.
paramcloud_api_urlstr | None= NoneOptional managed-cloud API URL used when the server URL points at a managed Kitaru deployment or staging environment.
paramtimeoutint | None= NoneOptional connection timeout forwarded when supported by the underlying runtime.
Returns
Nonefunclogin_to_server(server, *, api_key=None, refresh=False, project=None, no_verify_ssl=False, ssl_ca_cert=None, cloud_api_url=None, timeout=None) -> NoneConnect to a Kitaru server URL or managed workspace target.
paramserverstrKitaru server URL, workspace name, or workspace ID.
paramapi_keystr | None= NoneAPI key used to authenticate with the server.
paramrefreshbool= FalseForce a fresh authentication flow.
paramprojectstr | None= NoneProject name or ID to activate after connecting.
paramno_verify_sslbool= FalseDisable TLS certificate verification.
paramssl_ca_certstr | None= NonePath to a CA bundle used to verify the server.
paramcloud_api_urlstr | None= NoneOptional managed-cloud API URL used when connecting to staging or another non-default control plane.
paramtimeoutint | None= NoneOptional connection timeout forwarded when supported by the underlying runtime.
Returns
None