hutch_python.happi.get_happi_objs¶
- hutch_python.happi.get_happi_objs(db: str, light_ctrl: LightController, endstation: str, load_level: DeviceLoadLevel = DeviceLoadLevel.STANDARD, exclude_devices: List[str] | None = None, additional_devices: Dict[str, Dict[str, str]] | None = None) dict[str, Device] ¶
Get the relevant items for
endstation
from the happi databasedb
.This depends on a JSON
happi
database stored somewhere in the file system and handles setting up thehappi.Client
and querying the data base for items.Uses the paths found by the LightController, but does not use it to load the devices so we can do so ourselves and log load times.
- Parameters:
db (
str
) – path to the happi databaselight_ctrl (lightpath.LightController) – LightController instance constructed from the happi db
endstation (
str
) – Name of hutchload_level (
DeviceLoadLevel
) – load all or standard devicesexclude_devices (
Optional[List[str]]
) – an optional list of devices that should be excluded when loadingadditional_devices (
Optional[Dict[str, Dict[str, str]]]
) – an optional dictionary of dictionaries with happi search terms whose results are loaded
- Returns:
objs – A mapping from item name to item
- Return type:
dict