Back to Explore

fastapi/sqlmodel

GitHub
9 updates · last 90 daysOpen source

Last release:

SQLModel is a Python library for interacting with SQL databases using Python objects. It is designed to be simple and robust, built on top of Pydantic and SQLAlchemy, with compatibility intended for FastAPI. Useful for defining SQL table-like models with type annotations and performing CRUD operations while keeping code concise and editor-friendly.

Project status

  • Actively maintained: Yes, the most recent update was published on 2026-10-06, and there are multiple follow-on updates in late September and early October 2026, indicating ongoing work.
  • Apparent update cadence: Roughly weekly to every few weeks across 2026-06 to 2026-10 (for example, 0.0.39 on 2026-06-25, then 0.0.41 to 0.0.48 clustered from 2026-08-28 through 2026-10-06).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • 0.0.48

    Release 0.0.48 adds support for SQLAlchemy 2.1. The release notes only mention that feature plus internal CI and dependency bump housekeeping. The code changes also include substantial typing changes to SQLModel's `select` and `Session.exec` APIs, plus some packaging and development environment updates not called out in the release notes.

    Features
  • 0.0.47

    Release 0.0.47 adds direct support for PostgreSQL, MySQL, and MariaDB and wires those databases into CI. The code diff also shows test infrastructure changes to run against real database engines via Docker Compose and a shared database_engine fixture.

    Features
  • 0.0.46

    Release 0.0.46 contains a single fix intended to correct timedelta arithmetic involving UTC datetime fields. The code change updates the SQLAlchemy type behavior for UTCDateTime so expressions that mix UTCDateTime columns with timedelta values are coerced correctly.

  • 0.0.45

    Release 0.0.45 introduces the new default behavior for `datetime` fields to store and retrieve UTC-aware datetimes using a custom SQLAlchemy type, `UTCDateTime`. Naive datetimes are still accepted during Pydantic validation for plain `datetime`, but they are rejected when binding to the database. The release also adds extensive documentation and tests around timezone-aware vs timezone-naive datetimes.

    Breaking
  • 0.0.44

    Release 0.0.44 focuses on a refactor replacing the project’s local dataclass_transform shim with typing_extensions. The diff also bumps the package version and adds a new typing-focused test, likely to validate the typing behavior around Field parameters and aliasing.

  • 0.0.43

    Release 0.0.43 primarily fixes SQLAlchemy type handling for SQLModel Field, along with a set of internal dependency and tooling bumps. The only functional code changes in the diff are within sqlmodel/main.py related to how Field maps sa_type into SQLAlchemy Column, plus new validation around sa_column_kwargs.

  • 0.0.42

    Release 0.0.42 adds support for using Pydantic's Discriminator type as the value of the `discriminator` parameter in SQLModel's `Field`. It also updates the public API surface by re-exporting Pydantic's `Discriminator` and `Tag` from `sqlmodel`.

    Features
  • 0.0.41

    Release 0.0.41 deprecates the `min_items` and `max_items` parameters of `sqlmodel.Field`. The implementation also emits `DeprecationWarning`s and internally maps these parameters to `min_length` and `max_length`.

  • 0.0.40

    Version 0.0.40 mainly updates documentation and the project's GitHub automation (workflows, labeling, release preparation). The visible code diff contains no changes to SQLModel's Python runtime/library logic, only docs, CSS for docs UI, and CI/CD workflow configuration.

  • 0.0.39

    Release 0.0.39 has no publisher-provided release notes. The provided diff content shows primarily documentation and GitHub automation/workflow changes, with no obvious runtime library API changes in the excerpts shown.

  • 0.0.38

    Release 0.0.38 primarily contains typing annotation fixes for `SQLModel.__new__` and `tuple_`, plus documentation updates including a new tutorial snippet for the `.in_()` expression helper. It also includes several internal build and dependency management updates. The library runtime behavior appears unchanged in the diff shown, with most changes focused on docs, CI, and typing.

  • 0.0.37

    Release 0.0.37 is a small internal update focused on CI publishing behavior. It also bumps the library version to 0.0.37 and updates the project release notes document to include this internal note.

  • 0.0.36

    Release 0.0.36 primarily removes support for the `sqlmodel-slim` distribution variant. The package version is bumped to 0.0.36, and internal build configuration and tooling for `sqlmodel-slim` is deleted.

    Breaking
  • 0.0.35

    Release 0.0.35 primarily drops Python 3.9 support and includes internal maintenance to remove Python 3.9 specific files, alongside small tooling dependency bumps. The provided code diff shows a large deletion of docs and tutorial example code under paths ending with _py39, with no visible runtime/library API changes in the shown diff.

    Breaking
  • 0.0.34

    Release 0.0.34 is labeled as an internal-only update, focusing on CI test matrix adjustments and dependency version bumps. The repo updates tooling (ruff, typer) and FastAPI, and changes how the CI environment installs dependencies across “lowest” and “highest” resolution scenarios.

  • 0.0.33

    Release 0.0.33 is primarily documentation and internal maintenance. It bumps several tooling and framework dependencies, updates build configuration related to `sqlmodel-slim`, and adjusts async session docstring examples. The code diff also shows changes to CI/build hooks and test assertions for FastAPI `ValidationError` schema variations.

  • 0.0.32

    Release 0.0.32 includes a fix for SQLModel support of Pydantic 2.12+ when using Annotated fields, plus a small refactor to import Literal directly from typing. The diff also shows broad internal maintenance, including dependency bumps and a migration to uv for installation and build steps.

  • 0.0.31

    v0.0.31 drops Pydantic v1 support and refactors the internal Pydantic compatibility layer to assume Pydantic v2 behavior. The release also updates documentation tooling and several development dependencies.

    Breaking
  • 0.0.30

    Release 0.0.30 formally drops support for Python 3.8, updating CI and documentation accordingly. The release also updates internal development tooling, including pre-commit configuration and GitHub Actions versions, and significantly refactors documentation source example files to use newer Python-specific variants.

    Breaking
  • 0.0.29

    Release 0.0.29 adds Pydantic v2 alias support improvements and updates the Field helper so it can handle validation_alias and serialization_alias. The release notes only mention the alias support fix, but the code diff shows additional API surface area and changed runtime behavior, especially around Pydantic v1 error handling.