DB-API 2.0 driver & SqlAlchemy dialect for the AWS RDS Data API
NOTE: This is currently ALPHA quality software and has not been thoroughly tested yet
The RDS Data API allows use of MySQL and PostgreSQL RDS databases via an HTTP API, making it ideal for use in AWS Lambda because it allow syou to use RDS without running your lambda in a VPC. This library wraps that API in both a DB-API 2.0 driver and SqlAlchemy dialect allowing you to tap into the vast python ecosystem for working with relational databases.
Installation
pip install rdsdataapi
Usage
To use the DB-API 2.0 interface:
from rdsdataapi import connect
con = connect(
resource_arn="arn:aws:rds:us-east-1:490103061721:cluster:database-2",
secret_arn="arn:aws:secretsmanager:us-east-1:490103061721:secret:pgdb-gIucWr",
database="postgres",
)
cur = con.cursor()
cur.execute("select :foo as bar", {"foo": "foobar"})
result = cur.fetchall()
Or via SqlAlchemy:
engine = create_engine(
'rdsdataapi://',
connect_args=dict(
resource_arn="arn:aws:rds:us-east-1:490103061721:cluster:database-2",
secret_arn="arn:aws:secretsmanager:us-east-1:490103061721:secret:pgdb-gIucWr",
database="postgres",
)
)
with engine.connect() as con:
result = con.execute("select :foo as bar", foo="foobar")
Metadata
Release files for rdsdataapi 0.1.1
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 |
|---|---|---|---|---|
| rdsdataapi-0.1.1.tar.gz | 5.6 kB | Without provenance | Details for rdsdataapi-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rdsdataapi-0.1.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for rdsdataapi-0.1.1-py2.py3-none-any.whl |
Total release size: 10.5 kB
Release files / rdsdataapi-0.1.1.tar.gz
| Download URL | rdsdataapi-0.1.1.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc2571ca8f35fce6fa5eae33707339a782d4f32e0a7b6f0adddb9e8ccf3918b8
|
|
BLAKE2b-256 checksum How to use checksums |
65d1cfa11cf98337afb3e296f8e75d8af13c1351fc94044f573a42b790a4fc3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.3
|
Release files / rdsdataapi-0.1.1-py2.py3-none-any.whl
| Download URL | rdsdataapi-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a467d3c00007861f9f2fa3467650801e52c1cc974ee5ed01f0d8c23ec7235927
|
|
BLAKE2b-256 checksum How to use checksums |
5b29ac3ffcb9a3bc7a3c1778d10ee2e1ca9df86a8dfbcbf958449437e749bae2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.3
|
Security for rdsdataapi 0.1.1
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.