async support #1273
-
It would be nice to have instruction how to use SQLAlchemy async session with asyncpg with Flask-SQLAlchemy. I saw an issue opened in 2022 with similar request. It was closed because there were no need to rewrite library with async approach, however it was said that SQLAlchemy async session is already possible to implement with current library version overriding several methods. So, it would be very useful to get instruction on what exactly implementation is suggested. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Did you find out how to override the engine to return an async engine? I only found how to override the arguments that are passed to |
Beta Was this translation helpful? Give feedback.
-
You'll probably want to go with Flask-SQLAlchemy-Lite at this point. It is an official Pallets-Eco project just like this library. It tries to do as little as possible and as close to plain SQLAlchemy as possible, while still providing config and session management, including async sessions. |
Beta Was this translation helpful? Give feedback.
You'll probably want to go with Flask-SQLAlchemy-Lite at this point. It is an official Pallets-Eco project just like this library. It tries to do as little as possible and as close to plain SQLAlchemy as possible, while still providing config and session management, including async sessions.