sqlalchemy.schema DDLElement Example Code

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

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

Example 1 from alembic

Alembic (project documentation and PyPI page) is a data migrations tool used with SQLAlchemy to make database schema changes. The Alembic project is open sourced under the MIT license.

alembic / alembic / ddl / base.py

Example 2 from Amazon Redshift SQLAlchemy Dialect

Amazon Redshift SQLAlchemy Dialect is a SQLAlchemy Dialect that can communicate with the AWS Redshift data store. The SQL is essentially PostgreSQL and requires psycopg2 to properly operate. This project and its code are open sourced under the MIT license.

Amazon Redshift SQLAlchemy Dialect / sqlalchemy_redshift / ddl.py

Example 3 from sqlalchemy-utils

sqlalchemy-utils (project documentation and PyPI package information) is a code library with various helper functions and new data types that make it easier to use SQLAlchemy when building projects that involve more specific storage requirements such as currency. The wide array of data types includes ranged values and aggregated attributes.

sqlalchemy-utils / sqlalchemy_utils / view.py