roboto.env
Module Contents
ROBOTO_ENV_VAR_PREFIX
RobotoEnv
Bases: pydantic_settings.BaseSettings
Enivronment within an action invocation runtime
Parameters
_case_sensitive bool | None_nested_model_default_partial_update bool | None_env_prefix str | None_env_prefix_target pydantic_settings._env_file pydantic_settings._env_file_encoding str | None_env_file_depth int | None_env_ignore_empty bool | None_env_nested_delimiter str | None_env_nested_max_split int | None_env_parse_none_str str | None_env_parse_enums bool | None_cli_prog_name str | None_cli_parse_args bool | list[str] | tuple[str, ._cli_settings_source pydantic_settings._cli_parse_none_str str | None_cli_hide_none_type bool | None_cli_avoid_json bool | None_cli_enforce_required bool | None_cli_use_class_docs_for_groups bool | None_cli_show_env_vars bool | None_cli_exit_on_error bool | None_cli_prefix str | None_cli_flag_prefix_char str | None_cli_implicit_flags bool | Literal['dual', 'toggle'] | None_cli_ignore_unknown_args bool | None_cli_kebab_case bool | Literal['all', 'no_enums'] | None_cli_shortcuts collections._secrets_dir pydantic_settings._build_sources tuple[tuple[pydantic_settings.values AnyAttributes
RobotoEnv.action_inputs_manifest_file
RobotoEnv.action_parameters_file
RobotoEnv.action_runtime_config_dir
RobotoEnv.action_timeout
RobotoEnv.api_key
RobotoEnv.cache_dir
RobotoEnv.config_file
An override for the location of a roboto config file. If not provided, the default ~/.roboto/config.json will be used (subject to RobotoConfig’s implementation)
RobotoEnv.dataset_id
RobotoEnv.dataset_metadata_changeset_file
RobotoEnv.default()
Attributes
RobotoEnv.default_http_timeout
Give up on Roboto Platform HTTP requests that take longer than this many seconds to complete. If the request is known to be idempotent, it will be automatically retried. Set to None to wait indefinitely.
RobotoEnv.dry_run
Flag that action developers should use to gate side effects during local invocation.
When set to True, actions should skip operations that have side effects, such as: - Uploading files to Roboto datasets - Modifying metadata - Making external API calls that are not idempotent
This enables safe local testing and development without affecting production resources.
RobotoEnv.file_metadata_changeset_file
RobotoEnv.get_env_var()
Parameters
var_name strdefault_value Optional[str]Return type
Attributes
RobotoEnv.input_dir
RobotoEnv.invocation_id
RobotoEnv.log_level
RobotoEnv.org_id
RobotoEnv.output_dir
RobotoEnv.profile
The profile name to use if getting RobotoConfig from a config file.
RobotoEnv.roboto_env
RobotoEnv.roboto_service_endpoint
A Roboto Service API endpoint to send requests to, typically https://api.roboto.ai
RobotoEnv.roboto_service_url
Deprecated, use roboto_service_endpoint instead. Left here until 0.3.3 is released so we can migrate existing actions to use the new env var.
RobotoEnvKey
Bases: roboto.compat.StrEnum
Environment variable keys available within an action invocation runtime
Attributes
RobotoEnvKey.ActionInputs
The input manifest itself, as JSON, rather than a path to it.
Substrates that invocation pushed code have no sidecar to stage a file with and no shared filesystem to stage it onto, so the manifest travels by value. Where a sidecar runs beside the code, ActionInputsManifest names a file instead — that path stays the preferred form, because a large manifest does not belong in an environment block.
RobotoEnvKey.ActionInputsManifest
RobotoEnvKey.ActionInputsUrl
A presigned GET for the same manifest ActionInputs carries by value.
The by-reference half of one channel, because a manifest is not bounded: a selection of a few thousand files serialises to megabytes, which fits in no substrate’s environment block, while a five-file one costs an object write and a round trip it does not need. The platform picks the form by size; get_input() reads either, so nothing downstream knows which was used.
RobotoEnvKey.ActionParametersFile
RobotoEnvKey.ActionRuntimeConfigDir
RobotoEnvKey.ActionTimeout
RobotoEnvKey.ApiKey
RobotoEnvKey.CacheDir
RobotoEnvKey.ConfigFile
RobotoEnvKey.DatasetId
RobotoEnvKey.DatasetMetadataChangesetFile
RobotoEnvKey.DryRun
RobotoEnvKey.FileMetadataChangesetFile
RobotoEnvKey.InputDir
RobotoEnvKey.InvocationId
RobotoEnvKey.LogLevel
RobotoEnvKey.OrgId
RobotoEnvKey.OutputDir
RobotoEnvKey.Profile
RobotoEnvKey.RobotoEnv
RobotoEnvKey.RobotoServiceEndpoint
RobotoEnvKey.RobotoServiceUrl
Deprecated, use RobotoServiceEndpoint instead. Left here until 0.3.3 is released so we can migrate existing actions to use the new env var.
RobotoEnvKey.StageInputs
Whether the sidecar downloads the invocation’s selected files into $ROBOTO_INPUT_DIR.
Separate from the manifest because naming an invocation’s inputs and staging their bytes are separate channels: every invocation learns what it was invoked on, and only some want the bytes on disk. Reading “has inputs” as “download them” is what left an action declaring requires_downloaded_inputs=False with a choice between staging a selection it never asked for and seeing no inputs at all.
RobotoEnvKey.for_parameter()
Parameters
param_name strReturn type
Timeout
Timeout in seconds.
NotSet: Use the client’s default timeout None: No timeout (wait indefinitely) float: Explicit timeout in seconds
resolve_env_variables()
Given any input string, resolves any environment variables in the string against the current environment.
Parameters
value str