sunpeek.db_utils.crud.get_plants#
- sunpeek.db_utils.crud.get_plants(session, plant_id=None, plant_name=None, load_sensors=False)#
Gets a plant by name from the database, or all plants if no
plant_nameorplant_idparameter is supplied :type session:Session:param session: :type plant_id:int:param plant_id: :type plant_name:str:param plant_name:- Returns:
common.components.Plant object,if `plant_name`orplant_idparam is supplied,otherwise listofallcommon.components.Plant objects in the DB.