asi_core.config

Configuration for ASI tasks

The configuration is expected to be stored as pyranocam.yaml in the current directory. It should be formatted as YAML file.

Attributes

_config

Functions

load_config(→ None)

Load PyranoCam configuration from the given filename or the default location.

get(→ Any)

Retrieve a configuration value.

Module Contents

asi_core.config._config = None
asi_core.config.load_config(filename: str | pathlib.Path | None = None) None

Load PyranoCam configuration from the given filename or the default location.

Parameters:

filename – Where to load configuration from. If nothing is given, pyranocam.yaml is asserted.

asi_core.config.get(key: str | None = None, default: Any = None) Any

Retrieve a configuration value.

If configuration is not yet loaded, this is done automatically.

Parameters:
  • key – Name of the configuration section to load. If nothing is passed, the whole config dict will be returned.

  • default – Default value to return if the key is not present.

Returns:

The requested configuration section.