コード例 #1
0
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
コード例 #2
0
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