types-SQLAlchemy
Typing stubs for SQLAlchemy
Decision gist · record as of 2026-08-14
Yes, if you are using SQLAlchemy 1.4.x and want type checking support—install friction is negligible and the stubs are actively maintained via typeshed. No, if you are on SQLAlchemy 2.0.0 or later, as the package itself recommends uninstalling in favor of SQLAlchemy's native type annotations. Check your SQLAlchemy version first.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Only useful if you are using a type checker (mypy, pyright, pytype, or IDE type checking) and have SQLAlchemy installed.
- Not needed for SQLAlchemy 2.0.0 or later, which includes native type annotations.
- Low install friction with no runtime dependencies.
License · maintenance · safety
Apache-2.0 license (permissive) — Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions; attribution required.
last release 2023-05-01 (1201 days) · last repo commit 2026-08-14 · 5,108 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 503,640 downloads/mo, #6,303 on PyPI
Alternatives
Verify before relying
pip install types-SQLAlchemy
# Then use with mypy, pyright, or similar type checker
# in your project configuration or command line
mypy --strict your_sqlalchemy_code.py- Whether the stubs remain accurate for all SQLAlchemy 1.4.x patch versions beyond 1.4.53
- Coverage completeness for edge cases or less common SQLAlchemy APIs
What it is and what it does
types-SQLAlchemy is a stub-only package that provides type information for the SQLAlchemy ORM library. It is sourced from typeshed and allows static type checkers to understand and validate the types of SQLAlchemy objects and methods in your code. This enables IDE autocompletion, type error detection, and better code quality assurance when working with SQLAlchemy.
The package is designed for developers using SQLAlchemy versions prior to 2.0.0, which did not include native type annotations. If you are already on SQLAlchemy 2.0.0 or later, the package documentation explicitly recommends uninstalling types-SQLAlchemy in favor of the built-in annotations. The stubs are maintained as part of the typeshed project and receive updates through that repository.
Use it for
- Enable mypy or pyright to type-check SQLAlchemy ORM code in a legacy codebase using SQLAlchemy 1.4.x
- Provide IDE type hints and autocompletion for SQLAlchemy queries and model definitions
- Enforce stricter type safety in CI/CD pipelines that run static type checkers on database layer code
- Support pytype or PyCharm's built-in type checking for SQLAlchemy-based applications
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are using SQLAlchemy 1.4.x and want type checking support—install friction is negligible and the stubs are actively maintained via typeshed.
No, if you are on SQLAlchemy 2.0.0 or later, as the package itself recommends uninstalling in favor of SQLAlchemy's native type annotations. Check your SQLAlchemy version first.
Install
types-sqlalchemy on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance is active, though the latest release was in May 2023 and the package notes that SQLAlchemy 2.0.0+ includes its own type annotations, making this package potentially redundant for newer SQLAlchemy versions.
Only useful if you are using a type checker (mypy, pyright, pytype, or IDE type checking) and have SQLAlchemy installed. Not needed for SQLAlchemy 2.0.0 or later, which includes native type annotations.
License in practice
Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions; attribution required.
Quickstart
pip install types-SQLAlchemy
# Then use with mypy, pyright, or similar type checker
# in your project configuration or command line
mypy --strict your_sqlalchemy_code.py
Verify before relying
- Whether the stubs remain accurate for all SQLAlchemy 1.4.x patch versions beyond 1.4.53
- Coverage completeness for edge cases or less common SQLAlchemy APIs
Package facts
| License | Apache-2.0 license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 1,201 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 503,640 / month, #6,303 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Typing :: Stubs Only |
Evidence: types_SQLAlchemy-1.4.53.38-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 › “sqlalchemy pyright”
- types-SQLAlchemyProvides PEP 561 type stubs for SQLAlchemy, enabling type checkers…
- types-Flask-SQLAlchemyProvides type stubs for Flask-SQLAlchemy to enable static type…
- types-Flask-MigrateProvides type hints for Flask-Migrate, enabling type checkers like…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also sqlalchemy2-stubs · types-Flask-SQLAlchemy · sqlalchemy-stubs · scipy-stubs · trio-typing · types-DateTimeRange · pybind11-stubgen · types-termcolor · types-chardet · types-influxdb-client