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)))
Ejemplo n.º 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()
Ejemplo n.º 4
0
def main():
    DbSessionFactory.global_init()
    list_albums()