Add docs for SQL Alchemy ORM support#1237
Conversation
…hemy and add note on wrapper_plugins
|
|
||
| | Driver | Database Dialect | | ||
| |-------------------|------------------| | ||
| | `aws_wrapper_mysqlconnector` | `mysql` | |
There was a problem hiding this comment.
Curious on this "database dialect" - is that from our wrapper or sql alchemy? if it's our wrapper should we not support aurora-mysql and the other mysql database dialects too?
|
|
||
| The Read/Write Splitting Plugin is not supported for SQLAlchemy, since session binds already implement this functionality. | ||
|
|
||
| See the [official SQLAlchemy documentation on the Session API](https://docs.sqlalchemy.org/en/20/orm/session_api.html) for more information on session binds. |
There was a problem hiding this comment.
I would love to see this maybe structured a different way or with some additional plugins that ARE supported. You say that there are many other plugins and then only list one so I would suggest either
- add to line 34 that failover is the most relevant and then keep the section as is
- list iam as another plugin that is helpful after failover
I would also like rw splitting to be under a header of something like "not supported" It's confusing that it is positioned the same way as failover which is supported. Adding a not supported section would also give you space to mention that lack of pg support again
There was a problem hiding this comment.
We could consider reworking this into a plugin compatibility section, and create a table indicating which plugins are supported and which are not (rw splitting and srw)
|
|
||
| ## Using Plugins with SQLAlchemy | ||
|
|
||
| The AWS Advanced Python Wrapper supports a variety of plugins that enhance your SQLAlchemy application with features like failover handling, IAM authentication, and more. Most plugins can be enabled simply by adding them to the `wrapper_plugins` parameter in your database URL. |
There was a problem hiding this comment.
| The AWS Advanced Python Wrapper supports a variety of plugins that enhance your SQLAlchemy application with features like failover handling, IAM authentication, and more. Most plugins can be enabled simply by adding them to the `wrapper_plugins` parameter in your database URL. | |
| The AWS Advanced Python Wrapper supports a variety of plugins that enhance your SQLAlchemy application with features like failover handling, IAM authentication, and more. Most plugins can be enabled simply by adding them to the `wrapper_plugins` parameter in your database URL. | |
| > [!NOTE] | |
| > SQLAlchemy reserves the `plugins` connection parameter for its own engine, pool, and dialect event listeners. | |
| > When using SQLAlchemy, enable AWS Advanced Python Wrapper plugins (such as the Aurora Initial Connection Strategy plugin) via `wrapper_plugins`. Otherwise, use `plugins` as usual. |
|
|
||
| ### Failover Plugin | ||
|
|
||
| The Failover Plugin provides automatic failover handling for Aurora clusters. When a database instance becomes unavailable, the plugin automatically connects to a healthy instance in the cluster. |
There was a problem hiding this comment.
Can we add a link to the failover plugin docs here
Description
This PR adds documentation for SQL Alchemy ORM support.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.