Live data from Hacker News

HTTPX2 – A next-generation HTTP client for Python

github.com

11–20 of 50 posts

Re: HTTPX2 – A next-generation HTTP client for Python

#11
Noob question: what's the purpose of having so many request libraries? In JavaScript it's crazy, but in Python it's starting to feel the same: requests, httpx, httpx2...

From my perspective, HTTP requests have been mastered for years (decades?). What's the point of switching libraries? What's so extraordinary about the new HTTP library that makes requests look crap?

I understand that new protocols appear from time to time (like HTTP/2), but that's very rare. And if there are performance differences between two libraries, are they really that huge? Even if they are, 99% of people don't need that boost. What prevents someone from just improving the existing library's performance?

Re: HTTPX2 – A next-generation HTTP client for Python

#12
post #11

Noob question: what's the purpose of having so many request libraries? In JavaScript it's crazy, but in Python it's starting to feel the same: requests, httpx, httpx2... From my perspective, HTTP requests have been mastered for years (decades?). What's the point of switching libraries? What's so extraordinary about the new HTTP library that makes requests look crap? I understand that new protocols appear from time to…

`requests` has a friendlier API than the standard library. However, it does not support newer versions of HTTP, nor does it support `async`. The maintainer considers it complete, feature-frozen software, IIRC - they'd rather keep it stable for existing users and let other libraries succeed it.

`aiohttp` supports `async` but was never popular for non-async

`httpx` supported newer HTTP versions and both async and non-async. However the maintainer decided to close all outside submissions, issues and discussions for personal reasons.

`httpx2` is a maintained fork of `httpx`

Re: HTTPX2 – A next-generation HTTP client for Python

#13
post #11

Noob question: what's the purpose of having so many request libraries? In JavaScript it's crazy, but in Python it's starting to feel the same: requests, httpx, httpx2... From my perspective, HTTP requests have been mastered for years (decades?). What's the point of switching libraries? What's so extraordinary about the new HTTP library that makes requests look crap? I understand that new protocols appear from time to…

[deleted]

Re: HTTPX2 – A next-generation HTTP client for Python

#15
post #12
post #11

Noob question: what's the purpose of having so many request libraries? In JavaScript it's crazy, but in Python it's starting to feel the same: requests, httpx, httpx2... From my perspective, HTTP requests have been mastered for years (decades?). What's the point of switching libraries? What's so extraordinary about the new HTTP library that makes requests look crap? I understand that new protocols appear from time to…

`requests` has a friendlier API than the standard library. However, it does not support newer versions of HTTP, nor does it support `async`. The maintainer considers it complete, feature-frozen software, IIRC - they'd rather keep it stable for existing users and let other libraries succeed it. `aiohttp` supports `async` but was never popular for non-async `httpx` supported newer HTTP versions and both async and non-a…

Thanks for the explanation !

Re: HTTPX2 – A next-generation HTTP client for Python

#16
post #11

Noob question: what's the purpose of having so many request libraries? In JavaScript it's crazy, but in Python it's starting to feel the same: requests, httpx, httpx2... From my perspective, HTTP requests have been mastered for years (decades?). What's the point of switching libraries? What's so extraordinary about the new HTTP library that makes requests look crap? I understand that new protocols appear from time to…

There can be different APIs or different technical implementations with certain performance characteristics. In this case, there isn't any purpose, though. It's just that development has slowed or stopped on the previous libraries and forking/renaming is easier than trying to continue the previous projects, for various reasons.

Re: HTTPX2 – A next-generation HTTP client for Python

#17
post #4

People should be aware how much worse HTTPX performs versus Aiohttp. For high scale systems it makes a massive difference

I searched and searched for way too long and could not find any information on whether or not aiohttp supports HTTP/2 or 3... do you know or have any reference that explains what all is supported?

Re: HTTPX2 – A next-generation HTTP client for Python

#20
post #3

I would been pleased to see this project named something else, maybe “httpx-ng” or “httpy” as I immediately link “http*2” with the obsolete http/2 protocol and not the httpx project.

Ruby has httparty. https://github.com/jnunemaker/httparty
Post reply on HN