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 database db.

This depends on a JSON happi database stored somewhere in the file system and handles setting up the happi.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 database

  • light_ctrl (lightpath.LightController) – LightController instance constructed from the happi db

  • endstation (str) – Name of hutch

  • load_level (DeviceLoadLevel) – load all or standard devices

  • exclude_devices (Optional[List[str]]) – an optional list of devices that should be excluded when loading

  • additional_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