Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement per-request SQLAlchemy database session #32

Open
ProbablyFaiz opened this issue Dec 18, 2021 · 0 comments
Open

Implement per-request SQLAlchemy database session #32

ProbablyFaiz opened this issue Dec 18, 2021 · 0 comments
Assignees
Labels
infrastructure Dependency upgrades, refactors, etc.

Comments

@ProbablyFaiz
Copy link
Member

This is made a little bit tricky because we want to support sane database sessions not only within the scope of a Flask request but also when using these library functions generally. So we need some kind of helper method that, depending on whether the session is needed in the context of a Flask request or not, either uses a Flask request variable or some kind of global session.

Info here on Flask request variables: https://stackoverflow.com/questions/60446199/how-to-set-and-access-per-request-variable-in-flask-python

@ProbablyFaiz ProbablyFaiz added the infrastructure Dependency upgrades, refactors, etc. label Dec 18, 2021
@ProbablyFaiz ProbablyFaiz self-assigned this Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Dependency upgrades, refactors, etc.
Projects
None yet
Development

No branches or pull requests

1 participant