Correct async context manager #90
deknowny
started this conversation in
Show and tell
Replies: 1 comment
-
pref = RequestsPreference()
api = API(requests_preference=pref)
async with api:
# Doing stuff This pref should be re-usable and multiply-usage allowed at one time. Seems to using I should put the connection to context variable. Then it will recreate sessions on the same instance. It useful when you need doing something with same configuration |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Have a trouble
Beta Was this translation helpful? Give feedback.
All reactions