--- id: sqlalchemy-stubs version: "0.4" license: MIT License license_treatment: permissive maintenance: dormant --- # sqlalchemy-stubs — SQLAlchemy stubs and mypy plugin License: permissive · Maintenance: dormant · Downloads: 2.1M/mo ## 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 above — verify before relying. Provides type stubs and a mypy plugin to enable static type checking of SQLAlchemy code, helping type checkers understand SQLAlchemy's dynamic features. 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 pip install sqlalchemy-stubs uv add sqlalchemy-stubs poetry add sqlalchemy-stubs ## Installing sqlalchemy-stubs 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. 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 Requires mypy and typing-extensions to be installed; the plugin must be explicitly enabled in your mypy configuration 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: unspecified - Install friction: low - Maintenance: dormant - Downloads: 2.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags sqlalchemy type stubs, mypy sqlalchemy plugin, sqlalchemy static typing, type checking sqlalchemy, sqlalchemy type inference, mypy sqlalchemy support, sqlalchemy type hints, type-checking, sqlalchemy, mypy-plugin [View on SkillFed](https://skillfed.io/packages/sqlalchemy-stubs) · [View on PyPI](https://pypi.org/project/sqlalchemy-stubs/)