Get the number of rows in table using SQLAlchemy
This should work
rows = session.query(Congress).count()
EDIT: Another way related to my first try
from sqlalchemy import funcrows = session.query(func.count(Congress.id)).scalar()
This should work
rows = session.query(Congress).count()
EDIT: Another way related to my first try
from sqlalchemy import funcrows = session.query(func.count(Congress.id)).scalar()