diff options
| author | Ivan Levkivskyi <ilevkivskyi@dropbox.com> | 2019-02-08 19:10:19 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-02-08 14:47:02 -0500 |
| commit | b51f045ee555ecf5e9e3ee7383d00d5d52ca3f39 (patch) | |
| tree | 60a9b390d588c29b6b15a61f630c9e7041dad9b2 /doc/build/orm/extensions/declarative | |
| parent | 6c30a06aefd511ac3e84d1ceec0ea314e59117c2 (diff) | |
| download | sqlalchemy-b51f045ee555ecf5e9e3ee7383d00d5d52ca3f39.tar.gz | |
Add type stubs link to the docs
Moved by Mike to be a sidebar in the Declarative docs, as
the plugin appears to be specific to Declarative. These docs will
eventually be moved out of the "extension" section and merged
into the primary narrative documentation.
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Idba4c13ffc920b1140b5e51d206ab02f19015e8e
Diffstat (limited to 'doc/build/orm/extensions/declarative')
| -rw-r--r-- | doc/build/orm/extensions/declarative/basic_use.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/build/orm/extensions/declarative/basic_use.rst b/doc/build/orm/extensions/declarative/basic_use.rst index 63ab932c1..02f64b064 100644 --- a/doc/build/orm/extensions/declarative/basic_use.rst +++ b/doc/build/orm/extensions/declarative/basic_use.rst @@ -70,6 +70,15 @@ added to the underlying :class:`.Table` and Classes which are constructed using declarative can interact freely with classes that are mapped explicitly with :func:`.mapper`. + +.. sidebar:: Using MyPy with SQLAlchemy models + + If you are using PEP 484 static type checkers for Python, a `MyPy <http://mypy-lang.org/>`_ + plugin is included with + `type stubs for SQLAlchemy <https://github.com/dropbox/sqlalchemy-stubs>`_. The plugin + is tailored towards SQLAlchemy declarative models. + + It is recommended, though not required, that all tables share the same underlying :class:`~sqlalchemy.schema.MetaData` object, so that string-configured :class:`~sqlalchemy.schema.ForeignKey` |
