atmos.config
The atmos.config function runs atmos config through the current Atmos executable. Use it to read values from
the effective configuration, edit atmos.yaml by dot-notation path, and validate or format the file from
automation.
Usage
atmos.config(
*positionals,
flags = {},
args = [],
working_directory = ...,
env = ...,
output = "stream",
check = True,
)
Get operations default to JSON and captured output. Read result.data for the typed
value or result.stdout for raw JSON. Use flags = {"format": "raw"} for unquoted
text and output = "stream" to display output live. Other operations retain
streaming output. See query defaults.
Subcommands
Pass the subcommand and any positional arguments as strings before the keyword arguments. The call
atmos.config("get", "logs.level") runs atmos config get logs.level --format=json and captures its output.
| Subcommand | Purpose |
|---|---|
get | Read a value from the effective Atmos configuration by dot-notation path. |
set | Set a value in atmos.yaml by dot-notation path. |
delete | Delete a value from atmos.yaml by dot-notation path. Also available as del and unset. |
list | List editable atmos.yaml setting paths. |
format | Format the active atmos.yaml file. Also available as fmt. |
validate | Validate atmos.yaml against its JSON Schema. |
schema | Print the atmos.yaml JSON Schema. |
See the atmos config command reference for the complete list of subcommands and
flags.
Arguments
*positionals(Optional) Strings placed on the command line right after
config, in order: the subcommand and its positional arguments, such as the dot-notation path and the new value forset. Every value must be a string, so pass"true"or"5"rather than a boolean or an integer.flags(Optional) A dictionary of command-line options; see flag translation. For example,
{"type": "int"}becomes--type=intforset.args- (Optional) A list or tuple of strings appended after the flags.
working_directory,env,output,check(Optional) See
atmos.runfor process options and defaults.
Options other than the positionals are keyword-only.