def list_books(cls): """Prints all books in library to console.""" books = db.get_all_books() for book in books: read = "YES" if book["read"] else "NO" print(f"{book['name']} by {book['author']}, read: {read}")