--- id: sqlalchemy-redshift version: "1.0.0" license: MIT license_treatment: permissive maintenance: active --- # sqlalchemy-redshift — Amazon Redshift Dialect for sqlalchemy License: permissive · Maintenance: active · Downloads: 5.4M/mo ## 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 above — 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 pip install sqlalchemy-redshift uv add sqlalchemy-redshift 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_current - Install friction: low - Maintenance: active - Downloads: 5.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags sqlalchemy redshift dialect, redshift database orm, amazon redshift sqlalchemy, redshift sql toolkit, redshift connection pooling, redshift table reflection, redshift ddl compiler, redshift, orm, data-warehouse [View on SkillFed](https://skillfed.io/packages/sqlalchemy-redshift) · [View on PyPI](https://pypi.org/project/sqlalchemy-redshift/)