Commit 2d60d0c
authored
Async Version (#51)
This pull request introduces asynchronous support for the
`aurora-data-api` library, enabling developers to perform non-blocking
database operations. Key changes include the addition of an asynchronous
client and cursor implementation, updated documentation, and minor
refactoring of error handling imports.
This fixes #50
### Asynchronous Support
* **New Async Client and Cursor**: Added `AsyncAuroraDataAPIClient` and
`AsyncAuroraDataAPICursor` classes in `aurora_data_api/async_.py` to
provide asynchronous database interaction using `aiobotocore`. These
include methods for executing queries, managing transactions, and
handling paginated results.
* **Async Connection Function**: Introduced a `connect` function in
`aurora_data_api/async_.py` to create instances of the async client.
### Documentation Updates
* **Async Installation Instructions**: Updated `README.rst` to include
installation instructions for async support (`pip install
aurora-data-api[async]`).
* **Async Usage Examples**: Added examples for async database
operations, including query execution and iteration, to help developers
integrate async functionality.
[[1]](diffhunk://#diff-7b3ed02bc73dc06b7db906cf97aa91dec2b2eb21f2d92bc5caa761df5bbc168fR73-R85)
[[2]](diffhunk://#diff-7b3ed02bc73dc06b7db906cf97aa91dec2b2eb21f2d92bc5caa761df5bbc168fR94-R102)
### Codebase Refactoring
* **boto3 to botocore**: Refactored using botocore instead of boto3 to
keep the sync version (with botocore) and async version (with
aiobotocore) comparable. This should not cause any issues as this
library uses only the raw level API from boto3, which is actually
botocore.
* **Error Handling Imports**: Refactored imports in
`aurora_data_api/exceptions.py` to align with updated module names
(`error_codes_mysql` and `error_codes_postgresql`).1 parent ef6208e commit 2d60d0c
File tree
11 files changed
+1191
-477
lines changed- aurora_data_api
- test
11 files changed
+1191
-477
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
69 | 86 | | |
70 | 87 | | |
71 | 88 | | |
| |||
74 | 91 | | |
75 | 92 | | |
76 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
77 | 103 | | |
78 | 104 | | |
79 | 105 | | |
| |||
0 commit comments