Live data from Hacker News

Httpx: A next-generation HTTP client for Python

python-httpx.org

111–119 of 119 posts

Re: Httpx: A next-generation HTTP client for Python

#112

FastAPI creator here... if you use FastAPI, HTTPX would probably be the best match for sending requests, just saying... :D

What does FastAPI actually add on top of Starlette which it’s built upon?

Autocompletion everywhere, and from that, data validation, serialization, documentation. Dependency injection, OAuth2 stuff. Web standards. https://fastapi.tiangolo.com/features/

Re: Httpx: A next-generation HTTP client for Python

#113

FastAPI creator here... if you use FastAPI, HTTPX would probably be the best match for sending requests, just saying... :D

Writing FastAPI code as I procrastinate right now!

Ha! I'm glad it's enjoyable enough as to do it as "procrastination" :p

Re: Httpx: A next-generation HTTP client for Python

#117
post #69

Earlier quoted context omitted.

Indeed :) —> https://golang.org/pkg/net/http/ > Package http provides HTTP client and server implementations.

Am I missing something? https://docs.python.org/3/library/http.html https://docs.python.org/3/library/urllib.request.html

That's good, but that's arguably lower-level than httpx.

Re: Httpx: A next-generation HTTP client for Python

#118

Earlier quoted context omitted.

I prototyped moving to aiohttp from requests/multiprocessing. The speedup was amazing. Saw something like a 60% reduction in runtime for our use case. Only reason the code hasn't gone live: we currently use requests_negotiate_sspi for authentication, which sadly isn't supported by aiohttp. Not sure if httpx supports it. Looks like it might. Planning on giving it a shot next week.

We don’t have any third party packages for that authentication style yet, but we do have an API for supporting custom auth flows... https://www.python-httpx.org/advanced/#customizing-authentic... If you’re interested in trying httpx you’d be very welcome to raise an issue an issue related to NTLM/Negotiate authentication - it’d be really helpful for us to work through that and figure out if our auth API is sufficient…

Thanks, will do.

Re: Httpx: A next-generation HTTP client for Python

#119
post #89

Earlier quoted context omitted.

It looks like requests is now owned by PSF. https://github.com/psf/requests But IDK why requests3 wasn't transferred as well, and why issues appear to be disabled on the repo now. The docs reference a timeout arg (that appears to default to the socket default timeout) for connect and/or read https://3.python-requests.org/user/advanced/#timeouts And the tests reference a timeout argument. If that doesn't work, I wonde…

>But IDK why requests3 wasn't transferred as well, and That's thing... Who knows..

TIL requests3 beta works with httpx as a backend: https://github.com/not-kennethreitz/team/issues/21#issuecomm...

If requests3 is installed, `import requests' imports requests3

Post reply on HN