SQLAlchemy and Alembic 2 · Querying

Paginate

Return the second page of 20 rows.

page = session.scalars(select(Post).order_by(Post.id).limit(20).offset(20)).all()

Official SQLAlchemy and Alembic 2 documentation

More querying commands

All querying commands · SQLAlchemy and Alembic 2 cheatsheet

Was this page helpful?