alab_management.config module#

This file contains the configuration for the alab_management package. It will read from a yaml file to get all the configurations.

An example of the yaml file is as follows:

[general]
working_dir = "."
name = 'default_lab'

[mongodb]
host = 'localhost'
port = 27017
username = ''
password = ''

[rabbitmq]
host = "localhost"
port = 5672
class AlabOSConfig[source]#

Bases: object

Class used for storing all the config data.

get(item, default=None)[source]#

Get the config item.

is_sim_mode()[source]#

Check if the system is in simulation mode.

Return type:

bool

property path: Path#

The absolute path to the config file.

set_item(key, value)[source]#

Set a specific config item.

freeze_config(config_)[source]#

Convert the config dict to frozen config.

Parameters:

config – the dict of config data

Return type:

MappingProxyType

Returns:

frozen_config, which can not be modified