# pallets-eco/flask-sqlalchemy

Adds SQLAlchemy support to Flask

Repository: https://github.com/pallets-eco/flask-sqlalchemy
Canonical: https://ross.abutalabs.com/products/flask-sqlalchemy
Homepage: https://flask-sqlalchemy.readthedocs.io
Language: Python
License: BSD-3-Clause
License Family: permissive
Topics: python, flask, sqlalchemy, flask-sqlalchemy
Last push: 2026-05-18T23:27:00+00:00

## Health v2 (maintenance only)
Score: 60/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 83, release rhythm 8, longevity 100
- inputs: {"age_days": 5937, "days_push": 107, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4309, forks 906 (observed 2026-08-28T04:08:41.744241+00:00)

## What it is
Flask-SQLAlchemy is a Flask extension that integrates SQLAlchemy, providing sensible defaults and helpers for defining models and managing sessions in Flask applications. It is part of the Pallets Community Ecosystem and simplifies common database tasks like model declaration, session handling, and schema creation.

## Use cases
- add sqlalchemy to a flask app
- define database models in flask
- manage database sessions in flask
- create sqlite database tables from flask
- use an orm with flask
- connect flask to postgres or mysql

## When to choose
- you're building a Flask app that needs a relational database
- you want SQLAlchemy integration with Flask-specific defaults and helpers
- you want a maintained extension from the Pallets ecosystem

## When to avoid
- you're not using Flask
- you prefer configuring SQLAlchemy directly without wrapper helpers
- you need an async-first ORM integration for async Flask apps

## Facets
- artifact type: library
- maturity: stable
- function: orm, database, database-driver
- domain: web-development, backend, databases
- platform: python
- tags: flask, sqlalchemy, flask-extension, orm-integration, web-server

## Member repositories
- pallets-eco/flask-sqlalchemy (main) score 60

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:41.744241+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:48.423106+00:00, confidence not recorded.
  - readme: https://github.com/pallets-eco/flask-sqlalchemy (fetched 2026-08-28T04:08:41.744241+00:00, sha 7feefd320907)
  - registry_pypi: https://pypi.org/pypi/flask-sqlalchemy/json (fetched 2026-08-29T09:11:24.728543+00:00, sha 06484c4cf873)
- Data as of 2026-08-30T08:39:29.467469+00:00.
