Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8
A user-friendly client for AWS Aurora Serverless's Data API
License
koxudaxi/py-data-api
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
py-data-api is a client for Data API ofAurora Serverless.Also, the package includes SQLAlchemy Dialects and DB API 2.0 Client.
- SQLAlchemy Dialects
- DB API 2.0 compatible clientPEP 249
- MySQL
- PostgreSQL
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html
Warning: Some interface will be changed.
pydataapi requires Python 3.6.1 or later
$ pip install pydataapi
fromtypingimportListfromsqlalchemyimportColumn,Integer,Stringfromsqlalchemy.ext.declarativeimportdeclarative_basefrompydataapiimportDataAPI,ResultclassPets(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'defexample_driver_for_sqlalchemy():fromsqlalchemy.engineimportcreate_engineengine=create_engine('mysql+pydataapi://',connect_args={'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")print(result.fetchall())defexample_simple_execute():data_api=DataAPI(resource_arn=resource_arn,secret_arn=secret_arn,database=database)result:Result=data_api.execute('show tables')print(result.scalar())# Pets
We are waiting for your contributions topydataapi
.
https://koxudaxi.github.io/py-data-api/contributing
DataAPI Server for local
https://github.com/koxudaxi/local-data-api
https://pypi.org/project/pydataapi
https://github.com/koxudaxi/py-data-api
https://koxudaxi.github.io/py-data-api
py-data-api is released under the MIT License.http://www.opensource.org/licenses/mit-license
About
A user-friendly client for AWS Aurora Serverless's Data API
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors9
Uh oh!
There was an error while loading.Please reload this page.