get_bps_config_value¶
- lsst.ctrl.bps.parsl.get_bps_config_value(config: BpsConfig, key: str, dataType: type[T], default: T) T¶
- lsst.ctrl.bps.parsl.get_bps_config_value(config: BpsConfig, key: str, dataType: type[T], default: T | None = None, *, required: Literal[True]) T
- lsst.ctrl.bps.parsl.get_bps_config_value(config: BpsConfig, key: str, dataType: type[T], default: T | None = None) T | None
- Get a value from the BPS configuration. - I find this more useful than - BpsConfig.__getitem__or- BpsConfig.get.- Parameters:
- configBpsConfig
- Configuration from which to retrieve value. 
- keystr
- Key name. 
- dataTypetype
- We require that the returned value have this type. 
- defaultoptional
- Default value to be provided if - keydoesn’t exist in the- config. A default value of- Nonemeans that there is no default.
- requiredbool, optional
- If - True, the returned value may come from the configuration or from the default, but it may not be- None.
 
- config
- Returns:
- value
- Value for - keyin the- config`if it exists, otherwise- default, if provided.
 
- Raises:
- KeyError
- If - keyis not in- configand no default is provided but a value is- required.
- RuntimeError
- If the value is not set or is of the wrong type.