sqlalchemy-redshift
Amazon Redshift Dialect for sqlalchemy
What it is and what it does
sqlalchemy-redshift is a SQLAlchemy dialect that translates ORM queries and SQL expressions into Redshift-compatible SQL and handles connection management to Amazon Redshift clusters. It sits between your Python application and Redshift, allowing you to use SQLAlchemy's declarative ORM, query builder, and schema reflection tools without writing raw SQL.
The dialect implements Redshift-specific DDL compilation, datatype support (including GEOMETRY, SUPER, HLLSKETCH, and TIMETZ), and features like materialized views, spectrum table support, and IAM role-based COPY/UNLOAD commands. It requires a separate driver—either psycopg2 or redshift_connector—to establish actual database connections.
Use it for:
- Build a data warehouse application using SQLAlchemy ORM models that map to Redshift tables without writing SQL.
- Reflect an existing Redshift schema into Python objects to enable programmatic table and column inspection.
- Execute parameterized queries and bulk operations (COPY, UNLOAD) against Redshift from a Python application.
- Migrate a PostgreSQL application to Redshift by swapping the connection string and dialect while reusing most ORM code.
- Generate Redshift DDL (CREATE TABLE, ALTER TABLE) from SQLAlchemy schema definitions in Alembic migrations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a SQLAlchemy dialect for Amazon Redshift, enabling ORM and SQL expression language support against Redshift clusters via psycopg2 or redshift_connector.
Yes, if you are building a Python application against Amazon Redshift and want to use SQLAlchemy. The dialect is actively maintained, supports current Python versions (3.10–3.14), has no known vulnerabilities, and installs with low friction. You must separately choose and install a driver, but that is a one-time decision documented in the package's own guidance.
Install
sqlalchemy-redshift on PyPI
pip
pip install sqlalchemy-redshiftuv
uv add sqlalchemy-redshiftpoetry
poetry add sqlalchemy-redshiftInstalling sqlalchemy-redshift
Before you install
Low friction installation; the package itself is a pure-Python wheel. However, you must separately install either psycopg2 or redshift_connector to establish connections—the dialect does not bundle these. Maintenance is active with a recent release and ongoing support for current Python versions (3.10–3.14).
License in practice
MIT license is permissive; you may use, modify, and distribute this package with minimal restrictions, including in commercial software.
Quickstart
pip install sqlalchemy-redshift
import sqlalchemy as sa
engine = sa.create_engine('redshift+psycopg2://username@host.amazonaws.com:5439/database')
You must install either psycopg2, redshift_connector, or a compatible PostgreSQL driver separately; the dialect does not provide it as a required dependency.
Verify before relying
- Whether redshift_connector is a drop-in alternative to psycopg2 for all use cases or has known limitations.
- Performance characteristics of table reflection and DDL compilation on large Redshift schemas.
- Compatibility with Redshift Spectrum and other advanced Redshift features beyond those mentioned in release notes.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — SQLAlchemy, packaging |
| Maintenance | actively maintained — 108 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,411,556/month — #2,106 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sqlalchemy_redshift-1.0.0-py3-none-any.whl
Tags
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
psycopg2-binarypsycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
weaviate-clientA Python client library for connecting to and…
permissive · top 1,000 on PyPI
databricks-sql-connectorA Python client library that connects to…
permissive · top 1,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
chalk-sqlalchemy-redshiftProvides a SQLAlchemy dialect for Amazon…
permissive · top 15,000 on PyPI
redshift-connectorredshift_connector is a Python database driver…
permissive · top 1,000 on PyPI
sqlalchemy-risingwaveProvides a SQLAlchemy dialect that enables…
permissive · top 15,000 on PyPI
sqlalchemy-rdsiamProvides SQLAlchemy dialects for connecting to…
unclear · top 15,000 on PyPI
sqlalchemy-pgspiderProvides a SQLAlchemy dialect that enables…
permissive · top 15,000 on PyPI
sqlalchemy-cockroachdbA SQLAlchemy dialect that enables ORM and SQL…
permissive · top 5,000 on PyPI
teradatasqlalchemyProvides a SQLAlchemy dialect that enables…
unclear · top 5,000 on PyPI
sqlalchemy-jdbcapiSQLAlchemy dialect for JDBC and ODBC database…
permissive · top 15,000 on PyPI
sqlalchemy_exasolSQLAlchemy dialect that enables Python…
permissive · top 15,000 on PyPI
sqlalchemy-databricksProvides a SQLAlchemy dialect that connects to…
permissive · top 15,000 on PyPI