pytest-queryguard

Fail tests with N+1 queries, enforce query budgets and find missing indexes for SQLAlchemy 2.

queryguard: N+1 detected

  Order.customer was lazy-loaded 50 times
  first at app/orders.py:10 in list_orders
  fix: select(Order).options(joinedload(Order.customer))