Skip to content

Implement per-request SQLAlchemy database session #32

@ProbablyFaiz

Description

@ProbablyFaiz

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

Metadata

Metadata

Assignees

Labels

infrastructureDependency upgrades, refactors, etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions