https://github.com/sqlalchemy/sqlalchemy2-stubs
PEP-484 typing stubs for SQLAlchemy 1.4
https://github.com/sqlalchemy/sqlalchemy2-stubs
Last synced: 7 months ago
JSON representation
PEP-484 typing stubs for SQLAlchemy 1.4
- Host: GitHub
- URL: https://github.com/sqlalchemy/sqlalchemy2-stubs
- Owner: sqlalchemy
- License: mit
- Created: 2021-02-19T19:42:25.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-12-30T12:15:22.000Z (almost 2 years ago)
- Last Synced: 2024-09-08T01:53:25.395Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 458 KB
- Stars: 157
- Watchers: 6
- Forks: 41
- Open Issues: 40
-
Metadata Files:
- Readme: README.rst
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
===========================
SQLAlchemy 2 Stubs (Legacy)
===========================
These are interim PEP-484 typing stubs for the
`SQLAlchemy `_ **1.4 release series only**. They
are released concurrently along with a
`Mypy extension `_
which is designed to work with these stubs, which assists primarily in the area
of ORM mappings.
The stubs replace the use of the "sqlalchemy-stubs" package published by
Dropbox. Differences include that these stubs are generated against 1.4's API
as well as some adjustments to the use of generics. The sqlalchemy2-stubs stubs
package **will not work with SQLAlchemy 2.0, and will need to be explicitly /
manually uninstalled when upgrading to SQLAlchemy 2.0**.
This project should be considered **alpha level** and is not as mature
as the Dropbox stubs for the initial release.
See the Mypy plugin documentation at https://docs.sqlalchemy.org/en/14/orm/extensions/mypy.html
for an overview of how to use PEP-484 annotations with ORM mapped classes.
For SQLAlchemy 2.0, when released, **the sqlalchemy2-stubs project is not
compatible**. SQLAlchemy 2.0 will be / is fully pep-484 typed inline and
will not be compatible with any stubs. There unfortunately appears to be no
standard approach in Python for the problem of a library that upgrades to
include typing annotations inline, as typing tools will still consider
any installed stubs to take precedence. Therefore **sqlalchemy2-stubs
will need to be manually uninstalled when upgrading to SQLAlchemy 2.0**.
Code of Conduct
---------------
Above all, SQLAlchemy places great emphasis on polite, thoughtful, and
constructive communication between users and developers.
Please see our current Code of Conduct at
`Code of Conduct `_.
License
-------
SQLAlchemy is distributed under the `MIT license
`_.