Home » Science & Technology » Using SQLAlchemy Asynchronously With AsyncIO (SQLAlchemy 2.0)

Using SQLAlchemy Asynchronously With AsyncIO (SQLAlchemy 2.0)

Written By Ssali Jonathan on Friday, May 19, 2023 | 05:48 AM

 
In this video, we look at how we can use SQLAlchemy (both the core and the ORM) with asyncio in Python. This gives us the ability to make use of Python asynchronous features. It also allows us to use SQLAlchemy with asynchronous Python frameworks like Tornado or FastAPI. #python #sqlalchemy #python3 SOURCE CODE: https://github.com/jod35/SQLAlchemy-asyncio PLEASE BUY ME A COFFEE: https://www.buymeacoffee.com/jod35 SUBSCRIBE: https://youtube.com/@SsaliJonathan?sub_confirmation=1 GITHUB: https://github.com/jod35 TWITTER: https://twitter.com/jod35_ TIMESTAMPS: (00:00) Introduction (01:35) Project dependencies (03:29) Connecting to the database (core) (08:57) Running synchronous functions (10:05) Inserting data (using the core) (13:42) Select statements (using the core) (18:29) Closing a connection (20:08) Creating a connection (using the ORM) (23:48) Creating an async engine (26:00) Creating database tables (27:49) Inserting data (using the ORM) (36:05) select, insert, delete (45:50) Conclusion