Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

py-data-api is a user-friendly client for AWS Aurora Serverless's Data API

Project description

py-data-api - Data API Client for Python

Test Status PyPI version PyPI - Python Version codecov license Code style: black

py-data-api is a client for Data API of Aurora Serverless. Also, the package includes SQLAlchemy Dialects and DB API 2.0 Client.


  • SQLAlchemy Dialects
  • DB API 2.0 compatible client PEP 249

Support Database Engines

  • MySQL
  • PostgreSQL

What's AWS Aurora Serverless's Data API?

This project is an experimental phase.

Warning: Some interface will be changed.

How to install

pydataapi requires Python 3.6.1 or later

$ pip install pydataapi


from typing import List

from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base

from pydataapi import DataAPI, Result

class Pets(declarative_base()):
    __tablename__ = 'pets'
    id = Column(Integer, primary_key=True, autoincrement=True)
    name = Column(String(255, collation='utf8_unicode_ci'), default=None)

database: str = 'test'
resource_arn: str = 'arn:aws:rds:us-east-1:123456789012:cluster:serverless-test-1'
secret_arn: str = 'arn:aws:secretsmanager:us-east-1:123456789012:secret:serverless-test1'

def example_driver_for_sqlalchemy():
    from sqlalchemy.engine import create_engine
    engine = create_engine(
            'resource_arn': 'arn:aws:rds:us-east-1:123456789012:cluster:dummy',
            'secret_arn': 'arn:aws:secretsmanager:us-east-1:123456789012:secret:dummy',
            'database': 'test'}

    result = engine.execute("select * from pets")

def example_simple_execute():
    data_api = DataAPI(resource_arn=resource_arn, secret_arn=secret_arn, database=database)
    result: Result = data_api.execute('show tables')
    # Pets

Contributing to pydataapi

We are waiting for your contributions to pydataapi.

How to contribute

Related projects


DataAPI Server for local


Source Code



py-data-api is released under the MIT License.

Project details

Download files

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

Files for pydataapi, version 0.4.22
Filename, size File type Python version Upload date Hashes
Filename, size pydataapi-0.4.22-py3-none-any.whl (26.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pydataapi-0.4.22.tar.gz (27.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page