Skip to content

Getting a db session outside of a route handler #3458

Answered by Alc-Alc
aranvir asked this question in Q&A
Discussion options

You must be logged in to vote

Can you try session = await session_provider(state=connection.scope['app'].state, scope=connection.scope)

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@Alc-Alc
Comment options

@aranvir
Comment options

Answer selected by JacobCoffee
Comment options

You must be logged in to vote
2 replies
@peterschutt
Comment options

@aranvir
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants