def list_albums():
    session = DbSessionFactory.create_session()

    query = session.query(Album).order_by(Album.name.desc())
    albums = list(query)

    print("There are {} albums".format(len(albums)))
    for a in albums:
        print("* {} - {} tracks".format(a.name, len(a.tracks)))
예제 #2
0
def list_albums():
    session = DbSessionFactory.create_session()

    query = session.query(Album).order_by(Album.name.desc())
    albums = list(query)

    print("There are {} albums".format(len(albums)))
    for a in albums:
        print("* {} - {} tracks".format(a.name, len(a.tracks)))
def main():
    DbSessionFactory.global_init()
    list_albums()
예제 #4
0
def main():
    DbSessionFactory.global_init()
    list_albums()