Flask-SQLAlchemy recipes
4 tested Flask-SQLAlchemy integration recipes with Flask, SQLAlchemy, marshmallow-sqlalchemy, marshmallow. Exact pinned versions and a last-passed receipt, last run 2026-10-15.
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 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.
Used together with Flask-SQLAlchemy
FlaskSQLAlchemymarshmallow-sqlalchemymarshmallowflask-loginwerkzeugflask-migrateAlembic