mesahm
Joined 10 months ago
Joined 10 months ago
regards,
regards,
regards,
Three years later, here's where things stand:
HTTP/2 by default, HTTP/3 over QUIC when the server advertises it via Alt-Svc or via DNS HTTPS record. No configuration needed, the client negotiates automatically. This alone accounts for most of the performance difference in practice. A quick benchmark (1000 requests to httpbingo.org/get, reproduction steps in the README)
niquests 0.551s (HTTP/2) aiohttp 1.351s (HTTP/1.1) httpx 2.087s (HTTP/2)
Security defaults that should have been there years ago. OS trust store instead of bundled certifi. Certificate revocation checks via OCSP or CRL. Encrypted Client Hello. Post-quantum key exchange. None of this is exotic anymore - browsers have shipped most of it - but Python clients still don't do it.
DNS. DNS-over-HTTPS, DNS-over-TLS, DNS-over-QUIC, DNSSEC validation. Per-session resolver configuration.
Other things that accumulated over three years: Happy Eyeballs, WebSocket and SSE over all three HTTP versions, in-memory certificates for mTLS, connection-level telemetry (DNS/TCP/TLS timings via response.conn_info), native Unix socket support, and as of 3.18, experimental Pyodide/WASM support.
Migration is boring by design: import niquests as requests. Existing auth flows, cookie jars, .netrc, adapters - they all work. We also maintain compatibility shims for requests-mock, responses, and betamax.
Happy to discuss anything related to the project or HTTP in general.
I am the original author of "rtls". For years now, the Python experts are arguing about OpenSSL mandatory aspect in the distribution, and many other went into compiling CPython themselves against LibreSSL, or AWS-LC, (...)
I wanted the broader community to be able to just "run an alternative ssl backend" without effort.
The main goal is for anyone running a mere high level http client to be able to leverage a memory-safe TLS backend.
Behind the scene it's Rustls, with aws-lc-rs engine.
I'm also the author of Niquests http client, a drop in replacement for Requests. https://github.com/jawah/niquests and yes rtls is supported transparently with it.