Utilities¶
This page specifies utilities from inorbit_connector.utils.
read_yaml(fname, robot_id=None) -> dict¶
Reads a YAML file and returns a dictionary.
Behavior:
If the file is empty (YAML
null/ no content), returns{}.If
robot_idis not provided, returns the entire YAML object.If
robot_idis provided and is a top-level key in the YAML object, returnsdata[robot_id]and emits a DeprecationWarning (this selection format is deprecated).If
robot_idis provided but not found, raisesIndexError.
Notes:
New configurations should follow the
ConnectorConfigschema described in Configuration.
Constants¶
DEFAULT_TIMEZONE: default timezone string ("UTC").DEFAULT_LOGGING_CONFIG: path to the package default logging config file.