PyGrunn: introducing httpxyz: forking a top-100 Python package - Michiel Beijen

Tags: python, django, pygrunn

(One of my summaries of the 2026 one-day PyGrunn conference in Groningen, NL).

Years ago he listened to the “corecursive” podcast (recommended by Michiel), the one where Yann Collet got interviewed. He’s the author of the LZ4 and zstandard (zstd) compression algorithm. In 2016 zstandard was released. In 2017 it was used in the linux kernel. Since 2020 it is one of the official formats in zipfiles. And in 2025 it got added to the Python standard library in version 3.14.

requests is one of the most popular Python libraries. httpx has a similar API, but it is better. A top 100 pypy packages. Main advantages: HTTP/2 support and async support.

He liked httpx a lot. And zstandard, too. But zstandard wasn’t supported by httpx. All browsers support it, but not httpx. So he made a pull request in early 2024. It got merged! But there was no new release yet. The maintainer asked if he wanted to create a PR for the release. He did it and there was a new release. Hurray!

Months later, a bug surfaced. He created a bugfix, but that wasn’t merged and wasn’t merged and wasn’t merged. And there was no new release. And then the httpx maintainer recently turned off all discussion on github. Earlier the maintainer had done the same to django restframework. And to mkdocs. All heavily-used packages! And in the “encode” github organisation/company that uses donations to fund open source development. Weird…

There are also performance issues in httpx, which especially is a problem for several AI libraries.

So… he started httpxyz, it bills itself as the maintained fork of httpx. More info about the reasons for the fork at https://tildeweb.nl/~michiel/httpxyz.html .

It contains most of the bugfixes that have been pending for a while. More maintainers. Performance is much better (they needed to fork httpcore into httpcorexyz, it is 4x faster). API compatible. You just have to change the import. They used a PIL/pillow trick to make sure that if you import httpxz, later httpx imports use httpxyz instead.

There turned out to be quite a lot of small performance errors in the old code.

An important performance tip: use client (or if you use requests, use request.Session()):

import httpxyz

c = httpxyz.Client()
c.get(...)
c.get(...)

instead of just:

import httpxyz

httpxyz.get(...)
httpxyz.get(...)

Using a client means httpxyz (or requests) can use http features to spead up your requests a lot. Automatic connection keepilive. No more TCP handschake for every individual request. And no TLS/https handshake. And if your server supports http/2, the improvement is even bigger. You do need to install httpxyz[http2] and specifiy httpxyz.Client(http2=True).

Nice: httpxyz also has a command line interface.

Something he only mentioned briefly: there oauth2 client_credentials support. You have to define a way to grab an oauth2 token, but the rest of the client work just uses the regular methods. Handy.

They’re on https://codeberg.org/httpxyz/httpxyz instead of on github.

https://reinout.vanrees.org/images/2026/lac-de-kruth4.jpg

Unrelated photo: the “lac de Kruth-Wildenstein” reservoir during a family holiday in France in 2006.