--- id: types-sqlalchemy version: "1.4.53.38" license: Apache-2.0 license license_treatment: permissive maintenance: active --- # types-SQLAlchemy — Typing stubs for SQLAlchemy License: permissive · Maintenance: active · Downloads: 503.6K/mo ## 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 above — verify before relying. Provides PEP 561 type stubs for SQLAlchemy, enabling type checkers like mypy, pyright, and pytype to validate code using SQLAlchemy. 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 pip install types-sqlalchemy uv add types-sqlalchemy poetry add types-sqlalchemy ## Installing types-SQLAlchemy 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. 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 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. 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: unspecified - Install friction: low - Maintenance: active - Downloads: 503.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sqlalchemy type stubs, sqlalchemy type checking, mypy sqlalchemy, sqlalchemy type hints, pep 561 stubs, sqlalchemy pyright, static type checking database orm, type-stubs, sqlalchemy, type-checking [View on SkillFed](https://skillfed.io/packages/types-sqlalchemy) · [View on PyPI](https://pypi.org/project/types-sqlalchemy/)