Skip to main content

A Python DB-API 2.0 client for the AWS Aurora Serverless Data API

Project description

# aurora-data-api - A Python DB-API 2.0 client for the AWS Aurora Serverless Data API

Installation

pip install aurora-data-api

Prerequisites

Usage

Use this module as you would use any DB-API compatible driver module. The aurora_data_api.connect() method is the standard main entry point, and accepts two implementation-specific keyword arguments:

  • aurora_cluster_arn (also referred to as resourceArn in the Data API documentation)

  • secret_arn (the database credentials secret)

import aurora_data_api

cluster_arn = "arn:aws:rds:us-east-1:123456789012:cluster:my-aurora-serverless-cluster"
secret_arn = "arn:aws:secretsmanager:us-east-1:123456789012:secret:MY_DB_CREDENTIALS"
with aurora_data_api.connect(aurora_cluster_arn=cluster_arn, secret_arn=secret_arn, database="my_db") as conn:
    with conn.cursor() as cursor:
        cursor.execute("select * from pg_catalog.pg_tables")
        print(cursor.fetchall())

Motivation

The RDS Data API is the missing link between the AWS Lambda serverless environment and the sophisticated features provided by PostgreSQL and MySQL. The Data API tunnels SQL over HTTP, eliminating the need to use a traditional database driver

License

Licensed under the terms of the Apache License, Version 2.0.

https://travis-ci.org/chanzuckerberg/aurora-data-api.png https://codecov.io/github/chanzuckerberg/aurora-data-api/coverage.svg?branch=master https://img.shields.io/pypi/v/aurora-data-api.svg https://img.shields.io/pypi/l/aurora-data-api.svg https://readthedocs.org/projects/aurora-data-api/badge/?version=latest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aurora-data-api-0.0.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

aurora_data_api-0.0.1-py2.py3-none-any.whl (9.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file aurora-data-api-0.0.1.tar.gz.

File metadata

  • Download URL: aurora-data-api-0.0.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for aurora-data-api-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4330b14f87bfc4aab7f2dc7cccbf283102408799aa5cef5a398cb9e5e9be77c1
MD5 d571c604e5b4f9f7799dbeb67b87a6b1
BLAKE2b-256 fb36d6ae21208123589d5dbfa6e8292b5206c4fe96bf0d11fc9ad0a9d41281ea

See more details on using hashes here.

File details

Details for the file aurora_data_api-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: aurora_data_api-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for aurora_data_api-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 801c33a1a2846a4ca643c6ad377a8dbb5f80f8addb36afbbaae3030400f7ebac
MD5 3947b94279f4e81de0c4df9ce3efc8fd
BLAKE2b-256 bfd7df3fd63dabead19d0d4a7f0f2781e657c49b72057a8cd0a33c2ffd87bdf7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page