{"id":16101851,"url":"https://github.com/koxudaxi/py-data-api","last_synced_at":"2025-09-05T20:31:53.083Z","repository":{"id":45295271,"uuid":"190027651","full_name":"koxudaxi/py-data-api","owner":"koxudaxi","description":"A user-friendly client for AWS Aurora Serverless's Data API ","archived":false,"fork":false,"pushed_at":"2021-12-09T14:29:35.000Z","size":2833,"stargazers_count":40,"open_issues_count":7,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-28T06:24:52.241Z","etag":null,"topics":["api","aurora","aws","aws-aurora","client","data-api","dataapi","db-api","orm","python","python3","serverless","sql","sqlalchemy"],"latest_commit_sha":null,"homepage":"https://koxudaxi.github.io/py-data-api","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koxudaxi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-03T15:01:04.000Z","updated_at":"2024-02-04T16:10:31.000Z","dependencies_parsed_at":"2022-09-05T20:00:35.842Z","dependency_job_id":null,"html_url":"https://github.com/koxudaxi/py-data-api","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koxudaxi%2Fpy-data-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koxudaxi%2Fpy-data-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koxudaxi%2Fpy-data-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koxudaxi%2Fpy-data-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koxudaxi","download_url":"https://codeload.github.com/koxudaxi/py-data-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232059242,"owners_count":18466730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","aurora","aws","aws-aurora","client","data-api","dataapi","db-api","orm","python","python3","serverless","sql","sqlalchemy"],"created_at":"2024-10-09T18:51:27.093Z","updated_at":"2025-01-01T07:31:32.301Z","avatar_url":"https://github.com/koxudaxi.png","language":"Python","readme":"# py-data-api - Data API Client for Python\n\n[![Test Status](https://github.com/koxudaxi/py-data-api/workflows/Test/badge.svg)](https://github.com/koxudaxi/py-data-api/actions)\n[![PyPI version](https://badge.fury.io/py/pydataapi.svg)](https://badge.fury.io/py/pydataapi)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pydataapi)](https://pypi.python.org/pypi/pydataapi)\n[![codecov](https://codecov.io/gh/koxudaxi/py-data-api/branch/master/graph/badge.svg)](https://codecov.io/gh/koxudaxi/py-data-api)\n![license](https://img.shields.io/github/license/koxudaxi/py-data-api.svg)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\npy-data-api is a client for Data API of [Aurora Serverless](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html).\nAlso, the package includes SQLAlchemy Dialects and DB API 2.0 Client.\n\n## Features\n- SQLAlchemy Dialects\n- DB API 2.0 compatible client [PEP 249](https://www.python.org/dev/peps/pep-0249/)\n\n## Support Database Engines\n- MySQL\n- PostgreSQL\n\n## What's AWS Aurora Serverless's Data API?\nhttps://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html\n\n## This project is an experimental phase.\nWarning: Some interface will be changed.\n\n## How to install\npydataapi requires Python 3.6.1 or later \n```bash\n$ pip install pydataapi\n```\n\n## Example\n\n```python\nfrom typing import List\n\nfrom sqlalchemy import Column, Integer, String\nfrom sqlalchemy.ext.declarative import declarative_base\n\nfrom pydataapi import DataAPI, Result\n\n\nclass Pets(declarative_base()):\n    __tablename__ = 'pets'\n    id = Column(Integer, primary_key=True, autoincrement=True)\n    name = Column(String(255, collation='utf8_unicode_ci'), default=None)\n\n\ndatabase: str = 'test'\nresource_arn: str = 'arn:aws:rds:us-east-1:123456789012:cluster:serverless-test-1'\nsecret_arn: str = 'arn:aws:secretsmanager:us-east-1:123456789012:secret:serverless-test1'\n\ndef example_driver_for_sqlalchemy():\n    from sqlalchemy.engine import create_engine\n    engine = create_engine(\n        'mysql+pydataapi://',\n        connect_args={\n            'resource_arn': 'arn:aws:rds:us-east-1:123456789012:cluster:dummy',\n            'secret_arn': 'arn:aws:secretsmanager:us-east-1:123456789012:secret:dummy',\n            'database': 'test'}\n    )\n\n    result = engine.execute(\"select * from pets\")\n    print(result.fetchall())\n\ndef example_simple_execute():\n    data_api = DataAPI(resource_arn=resource_arn, secret_arn=secret_arn, database=database)\n    result: Result = data_api.execute('show tables')\n    print(result.scalar())\n    # Pets\n```\n\n## Contributing to pydataapi\nWe are waiting for your contributions to `pydataapi`.\n\n### How to contribute\n[https://koxudaxi.github.io/py-data-api/contributing](https://koxudaxi.github.io/py-data-api/contributing)\n\n\n## Related projects\n### local-data-api\n\nDataAPI Server for local \n\nhttps://github.com/koxudaxi/local-data-api\n\n## PyPi \n\n[https://pypi.org/project/pydataapi](https://pypi.org/project/pydataapi)\n\n## Source Code\n\n[https://github.com/koxudaxi/py-data-api](https://github.com/koxudaxi/py-data-api)\n\n## Documentation\n\n[https://koxudaxi.github.io/py-data-api](https://koxudaxi.github.io/py-data-api)\n\n## License\n\npy-data-api is released under the MIT License. http://www.opensource.org/licenses/mit-license\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoxudaxi%2Fpy-data-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoxudaxi%2Fpy-data-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoxudaxi%2Fpy-data-api/lists"}