sqlalchemy.schema ForeignKey Example Code

ForeignKey is a class within the sqlalchemy.schema module of the SQLAlchemy project.

CheckConstraint, Column, CreateIndex, CreateTable, DDLElement, ForeignKeyConstraint, Index, PrimaryKeyConstraint, and Table are several other callables with code examples from the same sqlalchemy.schema package.

Example 1 from sqlacodegen

sqlacodegen (PyPI package information) is a tool for reading from an existing relational database to generate code to create SQLAlchemy models based on that database. The project is primarily written and maintained by Alex Grönholm (agronholm) and it is open sourced under the MIT license.

sqlacodegen / sqlacodegen / codegen.py