from calibrestekje import Book, Publisher, init_session session = init_session("sqlite:///metadata.db") publisher = (session.query(Publisher) .filter(Publisher.name == "MIT Press").one()) books = (session.query(Book) .filter(Book.publishers.contains(publisher))) print(f"Books published by MIT Press: {books.count()}")