Registry / database / sqlalchemy-aurora-data-api

sqlalchemy-aurora-data-api

JSON →
library0.5.0pypypi✓ verified 88d ago

Provides an SQLAlchemy dialect for AWS Aurora Serverless Data API, enabling connection to Aurora clusters without persistent database connections. Current version 0.5.0, updated occasionally.

pip install sqlalchemy-aurora-data-api
INSTALL
IMPORT
SIG · SQLALCHEMY-AURORA-
S
sqlalchemy-aurora-data-api
databasepythonv0.5.0
Install
5.5s avg
Import
670ms
Disk
75MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.692s · 76.2MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 5.5s · import 0.648s · 74MB
75MB installed
● package 75MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

create_engine
✓ from sqlalchemy import create_engine
Standard SQLAlchemy import; engine URL uses aurora_data_api://

Basic usage: create an engine with the aurora_data_api dialect and query the database.

from sqlalchemy import create_engine import os # Requires AWS credentials configured via environment or IAM role engine = create_engine("aurora_data_api://?database=my_database&aws_region=us-east-1") with engine.connect() as conn: result = conn.execute("SELECT 1") print(result.fetchone())
Debug
Known issues
breakingThe dialect URL scheme is 'aurora_data_api' (not 'awsaurora' or 'data-api'). Using a wrong scheme results in import errors.
fix
Use create_engine('aurora_data_api://...')
affects: all
gotchaThe Data API has a 1MB payload limit for results. Large queries may fail with a 'Payload too large' error. Use pagination or limit result sets.
fix
Add LIMIT or use server-side cursors if available.
affects: all
deprecatedThis library is no longer actively maintained by the original authors (Chan Zuckerberg). It may lack support for newer SQLAlchemy versions.
fix
Consider using the official AWS library 'aws-sdk-python' or 'aurora-data-api' directly if needing updates.
affects: >=0.5.0
Errors
Common errors & fixes
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:aurora_data_api
Missing correct installation or import; SQLAlchemy cannot find the dialect plugin.
fix
Ensure sqlalchemy-aurora-data-api is installed: pip install sqlalchemy-aurora-data-api. Also verify SQLAlchemy version compatibility.
botocore.exceptions.NoCredentialsError: Unable to locate credentials
AWS credentials not configured for boto3.
fix
Set environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION, or use IAM role when running on AWS.
sqlalchemy.exc.OperationalError: (aurora_data_api.exceptions.DatabaseError) ... must appear in the GROUP BY clause or be used in an aggregate function
Aurora MySQL/PostgreSQL SQL strict mode; query violates GROUP BY rules.
fix
Adjust the SQL query to include all non-aggregated columns in GROUP BY or use aggregate functions.
Upgrade
Version history
0.5.0latest on PyPI · released Dec 30, 2023
Audit
Dependencies
sqlalchemyrequiredCore dependency for the dialect
boto3requiredAWS SDK for invoking Data API
Agent activity
38 hits · last 30 days
node
34
OpenAI (training)
1
Resources
sqlalchemy-aurora-data-api — pip install sqlalchemy-aurora-data-api · libregistry