This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Creating thread safe and managed sessions using SQLAlchemy. | |
The sessions that are created are expected to be: | |
- thread safe | |
- handle committing | |
- handle rolling back on errors | |
- handle session removal/releasing once context or thread is closed. | |
Author: Nitish Reddy Koripalli | |
License: MIT |