def get_people(tags=None): """ Retrieves a list of people :param tags: Restricts list to people having certain tags (comma-saprated list) :type tags: str :rtype: List[Person] """ people = Data.query('person').go() return people
def get_horses(): """ Retrieves a list of horses in the barn :rtype: List[Horse] """ result = Data.query('horse').sort('name').go() horses = [] for item in result: horses.append(Horse.from_dict(item)) return horses