Skip to content

What does scoping to request instead of thread mean exactly in versions 3+? #1376

Discussion options

You must be logged in to vote

Request contexts (and app contexts) are essentially scoped the same, because each request is handled by one thread. Nothing should have changed for you.

That said, from your questions it sounds like you're doing a lot of plain-SQLAlchemy stuff rather than using Flask-SQLAlchemy typical patterns. You'd probably be better served by Flask-SQLAlchemy-Lite: https://flask-sqlalchemy-lite.readthedocs.io/en/latest/

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by andrii-korotkov-verkada
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants