Repository navigation
How do sessions work with this lib? #345
Unanswered
MicaelJarniac
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi!
If I were to interact with an API "manually" with aiohttp, I'd do something like:
Notice the
async with aiohttp.ClientSession() as session:part.How does that work with this lib? From what I can tell, this same scenario would look something like this:
Where's the session here? How is it being handled? Does every call to a method of
GitHubcreate and destroy its own session? Is there a global session shared by the requests? When is the session created, and when is it destroyed?I'd expect it to work this way, for instance:
This way, it's explicit where the session is.
All reactions