skillfed

sqlalchemy-redshift

Amazon Redshift Dialect for sqlalchemy

sqlalchemy-redshift v1.0.0 5.4M downloads/30d#2,106 on PyPI228
Permissive license MIT Active released

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-redshift

uv

uv add sqlalchemy-redshift

poetry

poetry add sqlalchemy-redshift

Installing 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

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

sqlalchemy redshift dialectredshift database ormamazon redshift sqlalchemyredshift sql toolkitredshift connection poolingredshift table reflectionredshift ddl compiler
redshiftormdata-warehouse

More Front-Ends packages

SQLAlchemy

SQLAlchemy is a Python SQL toolkit and Object…

permissive · top 100 on PyPI

psycopg2-binary

psycopg2-binary is a PostgreSQL database…

copyleft · top 1,000 on PyPI

alembic

Alembic generates and manages database schema…

permissive · top 1,000 on PyPI

weaviate-client

A Python client library for connecting to and…

permissive · top 1,000 on PyPI

databricks-sql-connector

A Python client library that connects to…

permissive · top 1,000 on PyPI

psycopg

Psycopg 3 is a PostgreSQL database adapter for…

copyleft · top 1,000 on PyPI

chalk-sqlalchemy-redshift

Provides a SQLAlchemy dialect for Amazon…

permissive · top 15,000 on PyPI

redshift-connector

redshift_connector is a Python database driver…

permissive · top 1,000 on PyPI

sqlalchemy-risingwave

Provides a SQLAlchemy dialect that enables…

permissive · top 15,000 on PyPI

sqlalchemy-rdsiam

Provides SQLAlchemy dialects for connecting to…

unclear · top 15,000 on PyPI

sqlalchemy-pgspider

Provides a SQLAlchemy dialect that enables…

permissive · top 15,000 on PyPI

sqlalchemy-cockroachdb

A SQLAlchemy dialect that enables ORM and SQL…

permissive · top 5,000 on PyPI

teradatasqlalchemy

Provides a SQLAlchemy dialect that enables…

unclear · top 5,000 on PyPI

sqlalchemy-jdbcapi

SQLAlchemy dialect for JDBC and ODBC database…

permissive · top 15,000 on PyPI

sqlalchemy_exasol

SQLAlchemy dialect that enables Python…

permissive · top 15,000 on PyPI

sqlalchemy-databricks

Provides a SQLAlchemy dialect that connects to…

permissive · top 15,000 on PyPI