sqlalchemy-redshift
Amazon Redshift dialect for SQLAlchemy.
Installation
The package is available on PyPI:
pip install sqlalchemy-redshift
Usage
The DSN format is similar to that of regular Postgres:
>>> import sqlalchemy as sa
>>> sa.create_engine('redshift+psycopg2://username@host.amazonaws.com:5439/database')
Engine(redshift+psycopg2://username@host.amazonaws.com:5439/database)
See the RedshiftDDLCompiler documentation for details on Redshift-specific features the dialect supports.
Running Tests
Tests are ran via tox and can be run with the following command:
$ tox
However, this will not run integration tests unless the following environment variables are set:
REDSHIFT_HOST
REDSHIFT_PORT
REDSHIFT_USERNAME
PGPASSWORD (this is the redshift instance password)
REDSHIFT_DATABASE
REDSHIFT_IAM_ROLE_ARN
Note that the IAM role specified will need to be associated with redshift cluster and have the correct permissions to create databases and tables as well drop them. Exporting these environment variables in your shell and running tox will run the integration tests against a real redshift instance. Practice caution when running these tests against a production instance.
Continuous Integration (CI)
Project CI is built using AWS CodePipeline and CloudFormation. Please see the ci/ folder and included README.txt for details on how to spin up the project’s CI.
Releasing
To perform a release, you will need to be an admin for the project on GitHub and on PyPI. Contact the maintainers if you need that access.
You will need to have a ~/.pypirc with your PyPI credentials and also the following settings:
[zest.releaser] create-wheels = yes
To perform a release, run the following:
python -m venv ~/.virtualenvs/dist workon dist pip install -U pip setuptools wheel pip install -U tox zest.releaser fullrelease # follow prompts, use semver ish with versions.
The releaser will handle updating version data on the package and in CHANGES.rst along with tagging the repo and uploading to PyPI.
Metadata
Release files for deepnote-sqlalchemy-redshift 0.8.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deepnote_sqlalchemy_redshift-0.8.17.tar.gz | 37.7 kB | Without provenance | Details for deepnote_sqlalchemy_redshift-0.8.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deepnote_sqlalchemy_redshift-0.8.17-py3-none-any.whl | Python 3 | none | any | Details for deepnote_sqlalchemy_redshift-0.8.17-py3-none-any.whl |
Total release size: 74.0 kB
Release files / deepnote_sqlalchemy_redshift-0.8.17.tar.gz
| Download URL | deepnote_sqlalchemy_redshift-0.8.17.tar.gz |
|---|---|
| Size | 37.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f20417763b569cc799ccfc4980aef08765d351e32ca0ac471fc5b325cb160f3
|
|
BLAKE2b-256 checksum How to use checksums |
730fcf1705a36552727d18eb25258cccd377e8b03e1f22b3a748c2e44115f303
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.4
|
Release files / deepnote_sqlalchemy_redshift-0.8.17-py3-none-any.whl
| Download URL | deepnote_sqlalchemy_redshift-0.8.17-py3-none-any.whl |
|---|---|
| Size | 36.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96c6bb4760d6298a783728d73ef425cee7d5eaf2039850f49916ff4af473cd1f
|
|
BLAKE2b-256 checksum How to use checksums |
40fb5eef5b91a182a19bf825f964135893277eab89a023d151b7e81d24c1bcda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.4
|
Security for deepnote-sqlalchemy-redshift 0.8.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.