Metadata-Version: 2.4
Name: s3shift
Version: 0.1.0
Summary: A truly serverless Redshift on your own AWS account: Redshift SQL on DuckDB in a Lambda, over your S3 and RDS data, ≈ $0 when idle. redshift_connector API: from s3shift import redshift_connector.
Author: Frank Zhang
License: MIT
Project-URL: Homepage, https://github.com/cloudformer/s3shift
Project-URL: Repository, https://github.com/cloudformer/s3shift
Project-URL: Deploy, https://github.com/cloudformer/s3shift#quick-start
Project-URL: Compatibility, https://github.com/cloudformer/s3shift/blob/main/tests/compat/REPORT.md
Project-URL: Changelog, https://github.com/cloudformer/s3shift/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/cloudformer/s3shift/issues
Keywords: serverless,aws,lambda,redshift,duckdb,s3,data-warehouse,sql,analytics
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Database
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# s3shift

**Python client for [s3shift](https://github.com/cloudformer/s3shift) — a truly serverless Redshift: Redshift
SQL on DuckDB in a Lambda, over your own S3 and RDS data, ≈ $0 when idle.** The redshift_connector API,
standard library only. Part of [Redefine AWS Serverless](https://github.com/topics/redefine-aws-serverless).

```bash
pip install s3shift
```

```python
from s3shift import redshift_connector   # later: `import redshift_connector` against Redshift, nothing else changes

conn = redshift_connector.connect(host="xxx.lambda-url.us-east-2.on.aws", database="dev",
                                  user="admin", password="...")
cur = conn.cursor()
cur.execute("CREATE EXTERNAL TABLE clicks (user_id INT, day DATE) STORED AS PARQUET LOCATION 's3://my-lake/clicks/'")
cur.execute("SELECT day, count(*) FROM clicks WHERE day >= %s GROUP BY 1 ORDER BY 1", ["2026-01-01"])
cur.fetchall()            # ([datetime.date(2026, 1, 1), 1520], ...)
cur.fetch_dataframe()     # pandas, if installed
```

Every statement is committed when `execute()` returns; large results are fetched page by page inside
`execute()`. Not supported (raises `NotSupportedError`): stored procedures, UDFs, users / GRANT, Glue
Data Catalog schemas, materialized views.

The endpoint comes from deploying the [main repository](https://github.com/cloudformer/s3shift).
Compatibility: [REPORT.md](https://github.com/cloudformer/s3shift/blob/main/tests/compat/REPORT.md).
