SQL databases in Python, designed for simplicity, compatibility, and robustness.
In the future SQLModel will include the standard default recommended packages, and sqlmodel-slim
will come without those recommended standard packages and with a group of optional dependencies sqlmodel-slim[standard]
, equivalent to sqlmodel
, for those that want to opt out of those packages.
Features
.sqlmodel_update()
to update models in place, including an update
parameter for extra data. And fix implementation for the (now documented) update
parameter for .model_validate()
. PR #804 by @tiangolo.
Field()
with sa_type
. PR #505 by @maru0123-2004.
sa_column
excludes sa_column_args
, primary_key
, nullable
, etc. PR #681 by @tiangolo.#
in annotations (from MkDocs Material). PR #677 by @Matthieu-LAURENT39.Field
parameters from Pydantic 1.9.0
and above, make Pydantic 1.9.0
the minimum required version. PR #440 by @daniil-berg.AsyncSession
type annotations for exec()
. PR #58 by @Bobronium.ForeignKey
directly, remove repeated column construction from SQLModelMetaclass.__init__
and upgrade minimum SQLAlchemy to >=1.4.36
. PR #443 by @daniil-berg.get_sqlalchemy_type
. PR #669 by @tiangolo.1.4.29
(related to #434). PR #439 by @daniil-berg.docs/tutorial/create-db-and-table.md
. PR #601 by @SimonCW.docs/tutorial/fastapi/multiple-models.md
. PR #674 by @tiangolo.offset
in example with limit
and where
. PR #273 by @jbmchuck.le
(lte
is invalid, use le
). PR #207 by @jrycw.docs/db-to-code.md
. PR #649 by @MatveyF.docs/tutorial/relationship-attributes/define-relationships-attributes.md
. PR #474 by @jalvaradosegura.get_sqlachemy_type()
. PR #496 by @cmarqu.docs/tutorial/create-db-and-table.md
. PR #477 by @FluffyDietEngine.strict = true
instead of manual configs. PR #428 by @michaeloliverx.CITATION.cff
file for academic citations. PR #13 by @sugatoray.