sqlalchemy-stubs
SQLAlchemy stubs and mypy plugin
Decision gist · record as of 2026-08-14
Yes-with-conditions. The package is useful if you need mypy support for SQLAlchemy, but its dormant status (last release 2021-01-12) means you should verify compatibility with your current SQLAlchemy and mypy versions before relying on it.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires mypy and typing-extensions to be installed; the plugin must be explicitly enabled in your mypy configuration file.
- Low install friction with only two runtime dependencies (mypy and typing-extensions).
- However, the package is dormant—last release was 2021-01-12, and there has been no recent activity despite the repository remaining unarchived.
License · maintenance · safety
MIT License (permissive) — Licensed under MIT License (permissive), so you can use it freely in commercial and private projects with minimal restrictions.
last release 2021-01-12 (2040 days) · last repo commit 2024-06-10 · 584 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,122,244 downloads/mo, #3,276 on PyPI
Alternatives
Verify before relying
pip install sqlalchemy-stubs
# Add to mypy.ini or setup.cfg:
# [mypy]
# plugins = sqlmypy
import mypy # mypy plugin is configured via config file- Whether the plugin remains compatible with recent SQLAlchemy and mypy versions given the age of the last release.
- What 'basic use cases like inferring model field types' concretely covers and what patterns remain unsupported.
- Whether the package works with modern Python versions.
What it is and what it does
sqlalchemy-stubs is a type-checking plugin for mypy that adds static type support to SQLAlchemy code. SQLAlchemy uses dynamic Python features that static type checkers cannot easily understand, so this package bridges that gap by providing type stubs and a mypy plugin that work together to infer types more precisely.
The package requires mypy and typing-extensions as runtime dependencies and must be enabled in your mypy configuration file by adding 'plugins = sqlmypy' to your mypy config. It currently supports basic use cases like inferring model field types, though the project is in alpha status and dormant—the last release was 2021-01-12, so compatibility with recent versions is uncertain.
Use it for
- Enable mypy type checking on SQLAlchemy ORM models to catch type errors at development time.
- Infer column and relationship types automatically in SQLAlchemy model definitions.
- Integrate SQLAlchemy type checking into a CI/CD pipeline that runs mypy.
- Improve IDE autocomplete and type hints for SQLAlchemy query results and model attributes.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes-with-conditions.
The package is useful if you need mypy support for SQLAlchemy, but its dormant status (last release 2021-01-12) means you should verify compatibility with your current SQLAlchemy and mypy versions before relying on it.
Install
sqlalchemy-stubs on PyPI
Before you install
Low install friction with only two runtime dependencies (mypy and typing-extensions). However, the package is dormant—last release was 2021-01-12, and there has been no recent activity despite the repository remaining unarchived.
Requires mypy and typing-extensions to be installed; the plugin must be explicitly enabled in your mypy configuration file.
License in practice
Licensed under MIT License (permissive), so you can use it freely in commercial and private projects with minimal restrictions.
Quickstart
pip install sqlalchemy-stubs
# Add to mypy.ini or setup.cfg:
# [mypy]
# plugins = sqlmypy
import mypy # mypy plugin is configured via config file
Verify before relying
- Whether the plugin remains compatible with recent SQLAlchemy and mypy versions given the age of the last release.
- What 'basic use cases like inferring model field types' concretely covers and what patterns remain unsupported.
- Whether the package works with modern Python versions.
Package facts
| License | MIT License permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesmypytyping-extensions |
| Maintenance | Dormant 2,040 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,122,244 / month, #3,276 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaProgramming Language :: Python :: 3 |
Evidence: sqlalchemy_stubs-0.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mypy sqlalchemy plugin”
- sqlalchemy-stubsProvides type stubs and a mypy plugin to enable static type checking…
- sqlalchemy2-stubsProvides PEP-484 typing stubs for SQLAlchemy 1.4, enabling static…
- types-SQLAlchemyProvides PEP 561 type stubs for SQLAlchemy, enabling type checkers…
Give your agent the search over MCP, or paste the wish link into any chat.
More Quality Assurance packages
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
Ruff is a Python linter and code formatter written in Rust that combines linting, formatting, and code fixing into a single tool, replacing Flake8, Black, isort, and related utilities.
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
Black reformats Python source code to a consistent style by parsing entire files and rewriting them according to an opinionated, deterministic set of rules, eliminating manual formatting decisions.
pytest-xdist distributes pytest tests across multiple CPU cores or machines to speed up test execution, with the simplest usage being `pytest -n auto` to spawn workers equal to available CPUs.
Install it if your test suite takes long enough that parallelization would save meaningful time.
Validates AWS CloudFormation templates in YAML or JSON format against resource provider schemas and best practices, checking property values and configuration correctness.
Install it if you work with CloudFormation templates.
See also sqlalchemy2-stubs · types-SQLAlchemy · django-stubs · joblib-stubs · scipy-stubs · asyncpg-stubs · pika-stubs · mypy-zope · types-pika · types-mypy-extensions