Flask recipes
7 tested Flask integration recipes with Flask-JWT-Extended, Flask-SQLAlchemy, SQLAlchemy, webargs. Exact pinned versions and a last-passed receipt, last run 2026-10-15.
Flask 3 + Flask-JWT-Extended access and refresh tokens
Login, protected routes, refresh tokens and custom claims in Flask 3 using Flask-JWT-Extended, with an app factory.
Flask 3 app factory + Flask-SQLAlchemy
Flask application factory with Flask-SQLAlchemy 3, a JSON API and pytest fixtures using an in-memory database.
Flask API args parsed and validated with webargs and marshmallow
Flask routes that parse query strings and JSON bodies through marshmallow schemas via webargs, with JSON 422 validation errors, tested offline with the Flask test client.
Flask API with Flask-SQLAlchemy and marshmallow-sqlalchemy, validation errors as 422
A Flask JSON API that loads and dumps SQLAlchemy models through SQLAlchemyAutoSchema, returns validation errors as 422, and is tested offline with the Flask test client on in-memory sqlite.
Flask-Login sessions with Flask-SQLAlchemy users and werkzeug password hashing
Login, login_required redirects, logout and a user_loader built on db.session.get, with the User model in SQLite memory and tests run through the Flask test client.
Flask-SQLAlchemy models with Flask-Migrate upgrades on sqlite in tests
Define Flask-SQLAlchemy models, version the schema with Flask-Migrate, and test upgrade, downgrade and model/migration drift offline on a temporary sqlite file.
Flask-WTF forms with custom validators, CSRF on and off in tests
A Flask-WTF form with a reusable custom WTForms validator, rendered errors, and CSRF protection, tested offline with the Flask test client: CSRF disabled in the test config, then enforced.
Used together with Flask
Flask-JWT-ExtendedFlask-SQLAlchemySQLAlchemywebargsmarshmallowmarshmallow-sqlalchemyflask-loginwerkzeugflask-migrateAlembicflask-wtfwtforms