When using partitioned tables in PostgreSQL, SQLAlchemy does not require any special syntax. You query them the same way you would query a regular table. PostgreSQL handles the partition pruning automatically.
stmt = select(UserOrm).where(UserOrm.birth_year == 1990)
result = session.execute(stmt).scalars().all()