We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Right now we are using a global SQLAlchemy Session object for all transactions:
Session
SessionMaker = sessionmaker(bind=engine, autocommit=False, autoflush=False) session = SessionMaker()
This should be changed so we use SesssionMaker() within each request using Depends in FastAPI: https://fastapi.tiangolo.com/tutorial/sql-databases/.
It may also be worth migrating to SQLModel (which uses pydantic & SQLAlchemy).
The text was updated successfully, but these errors were encountered:
Remove global session object
49b9f8a
Fixes #12
@plaplant Let me know your thoughts on this if any, otherwise I will just go ahead and merge
Sorry, something went wrong.
JBorrow
Successfully merging a pull request may close this issue.
Right now we are using a global SQLAlchemy
Session
object for all transactions:This should be changed so we use SesssionMaker() within each request using Depends in FastAPI: https://fastapi.tiangolo.com/tutorial/sql-databases/.
It may also be worth migrating to SQLModel (which uses pydantic & SQLAlchemy).
The text was updated successfully, but these errors were encountered: