Flask Application Factory: Why create_app() Beats a Global App Object
Flask's create_app() factory pattern gives you per-environment app instances, clean pytest fixtures, and no import-time side effects. A worked example plus the circular-import and app-context mistakes to avoid.