sunpeek.db_utils.crud.get_components#

sunpeek.db_utils.crud.get_components(session, component, id=None, name=None, plant_id=None, plant_name=None, attr=None)#

Get a component, or list of components from the database.

Parameters:
  • session (Session)

  • component (An instance of a subclass of cmp.Component)

  • id (int)

  • name (str)

  • plant_id (int)

  • plant_name (str)

Return type:

Component object, or list of Component objects