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

Suggestion for adding async via httpx or aiohttp #149

Open
griff-rees opened this issue Jun 26, 2020 · 2 comments
Open

Suggestion for adding async via httpx or aiohttp #149

griff-rees opened this issue Jun 26, 2020 · 2 comments

Comments

@griff-rees
Copy link

griff-rees commented Jun 26, 2020

This looks like a nice project. I think I'll stick with yours, but if my initial approach using async could be helpful I thought I'd flag that for discussion. Request quotas may mean it's not worth the complexity.

This gist is an example using httpx async features and aiofiles. Had aimed to use these async testing options. It's close but not quite the same as requests. I think aiohttp may be closer to requests.

@Michael-E-Rose
Copy link
Contributor

Hi @griff-rees ! I learned a lot through your post, having never heard of some of those packages.

Do I understand correctly that you're suggesting to use aiohttp or httpx instead of requests? What would be the benefits?

@griff-rees
Copy link
Author

It would be a significant change but I do think it would be compatible with python >= 3.6. I also think there were discussions to add async features to the next release of requests but that may be far off.

So: if scalability is a significant frustration for users of this library, even with the quotas, then it could be worth the effort. It may require detailed planning though, and like httpx it would be safest to retain a non-async option for compatibility.

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

No branches or pull requests

2 participants