What is the public api for sqlalchemy? #8893
Replies: 1 comment 3 replies
|
the sphinx documentation is a work in progress and it is not always easy to get it to be consistent about module naming. Additionally, tools like Pylance tend to pop things up from their "real" module, like "sqlalchemy.schema.Column" above. for SQLAlchemy 2.0, the goal is that all objects in the public API will be from "sqlalchemy.", "sqlalchemy.orm." "sqlalchemy.ext" the sub-modules of "sqlalchemy.ext" one level deep, "sqlalchemy.dialects" and the submodules of "sqlalchemy.dialects" one level deep. This is mostly how it is in 1.4 however there is a lot of historical use of "sqlalchemy.sql.expression", etc. Overall the best guide to where imports should come from should be based on the examples given in the documentation for various API features. the auto-generated Sphinx documentation is not that accurate as of yet. |

the sphinx documentation is a work in progress and it is not always easy to get it to be consistent about module naming. Additionally, tools like Pylance tend to pop things up from their "real" module, like "sqlalchemy.schema.Column" above.
for SQLAlchemy 2.0, the goal is that all objects in the public API will be from "sqlalchemy.", "sqlalchemy.orm." "sqlalchemy.ext" the sub-modules of "sqlalchemy.ext" one level deep, "sqlalchemy.dialects" and the submodules of "sqlalchemy.dialects" one level deep. This is mostly how it is in 1.4 however there is a lot of historical use of "sqlalchemy.sql.expression", etc.
Overall the best guide to where imports should come from should be based on the ex…