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

Hyper alternative #146

Closed
matjazp opened this issue Aug 22, 2019 · 2 comments · Fixed by #162
Closed

Hyper alternative #146

matjazp opened this issue Aug 22, 2019 · 2 comments · Fixed by #162

Comments

@matjazp
Copy link

matjazp commented Aug 22, 2019

Just stumbled on this interesting stuff: https://github.com/encode/httpx. We could test it as a replacement for now unmaintained Hyper...

Thoughts?

@PrimozGodec
Copy link
Collaborator

I think using this library is a good idea. It looks well maintained. Also, based on documentation it has all the features that we need.

We can use parallel requst, similarly than it is done with Hyper now:

with httpx.parallel() as parallel:
    for counter in range(1, 10):
        parallel.get(f'https://example.com/{counter}')
    while parallel.has_pending_responses:
        r = parallel.next_response()

It also offers an Async client if we would like to switch to.

@PrimozGodec
Copy link
Collaborator

PrimozGodec commented Oct 18, 2019

When parallel requests are ready we switch to httpx: encode/httpx#52

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 a pull request may close this issue.

2 participants