Skip to content
New issue

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

Async handler #32

Merged
merged 12 commits into from
Nov 6, 2020
Merged

Async handler #32

merged 12 commits into from
Nov 6, 2020

Conversation

UmanShahzad
Copy link
Contributor

Closes #25

The async handler will be available through a getHandlerAsync function, which returns a AsyncHandler object, different from the getHandler function returning the synchronous Handler.

Keeping the code completely separate is likely the most sensible solution in practice - if you're using async, you likely always want async stuff, so you don't care about the sync code. And if you're using sync, you likely are doing so because you can't use the async stuff. This separation allows us to change the two implementations totally in isolation.

Mostly copies code, some optimization, brings up
tests cases.

Not actually fully async yet because ultimately
calls sync code via the requests library.
@UmanShahzad UmanShahzad self-assigned this Nov 3, 2020
@UmanShahzad
Copy link
Contributor Author

The only step left is to replace the requests calls in the AsyncHandler with calls to asyncio HTTP client functions.

@UmanShahzad UmanShahzad changed the title [WIP] Async handler Async handler Nov 5, 2020
@UmanShahzad
Copy link
Contributor Author

Last step is to document in README.md.

@UmanShahzad UmanShahzad merged commit 91d51d4 into master Nov 6, 2020
@UmanShahzad UmanShahzad deleted the uman/asyncio branch November 6, 2020 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support for async
1 participant