How to flatten results of a SQLAlchemy query in one single object? Flask flyf35 — 8 April 2023 · Comments off Solution {% for user, nb_pets in users %} {{ user.name }} {{ nb_pets }} {% endfor %}