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

feat: add httpx transport; add compute_engine async #1255

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bkanuka
Copy link

@bkanuka bkanuka commented Mar 23, 2023

Opening a draft PR to gauge interest in adding an httpx transport.

This is used internally for a project that otherwise relied on httpx (instead of aiohttp) for async http requests. Using this httpx transport means that the response from an AuthorisedSession is an httpx.Respose like the other responses in our code.

Frankly, this a copy/paste job from _aiohttp_requests.py with relevant parts changed.


compute_engine._credentials_async.py is also added for async Compute Engine credentials. Arguably, this should be discussed separately, but was created while developing the httpx transport.


There is more work to be done before this could merge, but please discuss and provide feedback.

@google-cla
Copy link

google-cla bot commented Mar 23, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@bkanuka bkanuka changed the title add httpx transport; add compute_engine async feat: add httpx transport; add compute_engine async Mar 23, 2023
@bkanuka bkanuka marked this pull request as ready for review March 29, 2023 19:20
@bkanuka bkanuka requested review from a team as code owners March 29, 2023 19:20
@clundin25
Copy link
Contributor

Super cool! I will give this a thorough read later.

Two high level questions I have for you.

  1. What made you decide to use HTTPX instead of aiohttp?
  2. Is it feasible to support both with the same code?
    • I will be digging into this later.

@Lawouach
Copy link

Oh this is exactly what I'd need. httpx is such a brilliant library, it would be awesome of the Google auth client could natively support it.

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.

None yet

3 participants