Flask-SQLAlchemy-Lite
Integrate SQLAlchemy with Flask. Use Flask's config to define SQLAlchemy database engines. Create SQLAlchemy ORM sessions that are cleaned up automatically after requests.
Intended to be a replacement for Flask-SQLAlchemy. Unlike the prior extension, this one does not attempt to manage the model base class, tables, metadata, or multiple binds for sessions. This makes the extension much simpler, letting the developer use standard SQLAlchemy instead.
Pallets Community Ecosystem
[!IMPORTANT]
This project is part of the Pallets Community Ecosystem. Pallets is the open source organization that maintains Flask; Pallets-Eco enables community maintenance of Flask extensions. If you are interested in helping maintain this project, please reach out on the Pallets Discord server.
A Simple Example
from flask import Flask
from flask_sqlalchemy_lite import SQLAlchemy
from sqlalchemy import select
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
class Base(DeclarativeBase):
pass
class User(Base):
__tablename__ = "user"
id: Mapped[int] = mapped_column(primary_key=True)
username: Mapped[str] = mapped_column(unique=True)
app = Flask(__name__)
app.config["SQLALCHEMY_ENGINES"] = {"default": "sqlite:///default.sqlite"}
db = SQLAlchemy(app)
with app.app_context():
Base.metadata.create_all(db.engine)
db.session.add(User(username="example"))
db.session.commit()
users = db.session.scalars(select(User))
Metadata
Release files for Flask-SQLAlchemy-Lite 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flask_sqlalchemy_lite-0.2.1.tar.gz | 10.4 kB | With provenance | Details for flask_sqlalchemy_lite-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flask_sqlalchemy_lite-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for flask_sqlalchemy_lite-0.2.1-py3-none-any.whl |
Total release size: 20.6 kB
Release files / flask_sqlalchemy_lite-0.2.1.tar.gz
| Download URL | flask_sqlalchemy_lite-0.2.1.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6de2f70c835a2c0a11264cbbc0cc33e7ed9732a52ee056781c5739e960213d2f
|
|
BLAKE2b-256 checksum How to use checksums |
b7dc3f4c55cfc03e189e50b80843d5d3ff70c97711d924537b7a5ad8587cf7fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2025.
Transparency logRelease files / flask_sqlalchemy_lite-0.2.1-py3-none-any.whl
| Download URL | flask_sqlalchemy_lite-0.2.1-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93f1df6228389fdc60a0733353f8c1a18aaeaf03c8d6ab541bafdf2987c5e777
|
|
BLAKE2b-256 checksum How to use checksums |
20f3df9d508d4ed9657ae23d9e936ca2f2c0556742c032598e0d79f78e64646f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2025.
Transparency logSecurity for Flask-SQLAlchemy-Lite 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for flask_sqlalchemy_lite-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.