Skip to content

How to use SQLAlchemy type stubs #8763

@kasium

Description

@kasium

Hi guys,

I have the following question: In a project of mine I use SQLAlchemy with a declarative Base, which means for proper typing I use SQLAlchemy's mypy plugin and therefore sqlalchemy2-stubs. Now, I use also flask-sqlachemy and would like to annotate them here with SQLAlchemy hints (these are still missing in the stub).

  1. Why do we have types-sqlalcehmy if sqlalchemy2-stubs exists (as far as I know sqlalchemy2-stubs are really just pyi files)?
  2. If I use sqlalchemy2-stubs in my project and types-flask-sqlalchemy bases on types-sqlalchemy it will lead to a clash of typing stubs, right?

Thanks a lot for clarifying this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions