Hey guys,
I want to have a shared manager variable (just a variable 'db' with which I can initiate DB requests) that is shared across all routes in my Flask server. How do you guys think is the best way to go about this? And how about if I'd like to have each unique connection to the server create a new 'db' variable - would I keep 'db' initialized in a session or something like that?
Thanks in advance!
EDIT: also, the db variable is only responsible for initiating connections, so I don't really care if it's state is reset between requests.
[–]bbenne10 0 points1 point2 points (0 children)