Python Forum
HTTP Client 2/3, multiplexed connection, advanced security, DNS-over-QUIC, etc..
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HTTP Client 2/3, multiplexed connection, advanced security, DNS-over-QUIC, etc..
#1
Information 
Hello,

I am proposing the community to discover a HTTP client that ideally is a drop-in replacement of the popular Requests.
Also opening that discussions to listen at what you would expect / need from such a client nowadays.

It is the only client to truly leverage HTTP/2 and 3 capabilities. And you can migrate your actual code base without effort.

Source: https://github.com/jawah/niquests

Here a partial extract of its features:
  • DNS over HTTPS, DNS over QUIC, DNS over TLS, and DNS over UDP
  • Automatic Content Decompression and Decoding
  • OS truststore by default, no more certifi!
  • OCSP Certificate Revocation Verification
  • Advanced connection timings inspection
  • In-memory certificates (CAs, and mTLS)
  • Browser-style TLS/SSL Verification
  • Sessions with Cookie Persistence
  • Keep-Alive & Connection Pooling
  • International Domains and URLs
  • Automatic honoring of .netrc
  • Basic & Digest Authentication
  • Familiar dict–like Cookies
  • Network settings fine-tuning
  • Object-oriented headers
  • Multi-part File Uploads
  • Chunked HTTP Requests
  • Fully type-annotated!
  • SOCKS Proxy Support
  • Connection Timeouts
  • Streaming Downloads
  • HTTP/2 by default
  • HTTP/3 over QUIC
  • Multiplexed!
  • Thread-safe!
  • DNSSEC!
  • Async!

>>> import niquests
>>> s = niquests.Session(resolver="doh+google://", multiplexed=True)
>>> r = s.get('https://pie.dev/basic-auth/user/pass', auth=('user', 'pass'))
>>> r.status_code
200
>>> r.headers['content-type']
'application/json; charset=utf8'
>>> r.oheaders.content_type.charset
'utf8'
>>> r.encoding
'utf-8'
>>> r.text
'{"authenticated": true, ...'
>>> r.json()
{'authenticated': True, ...}
>>> r
<Response HTTP/3 [200]>
>>> r.ocsp_verified
True
>>> r.conn_info.established_latency
datetime.timedelta(microseconds=38)
This project has potential, so I like to think.
I am asking to the community to interact with this project to increase its visibility if you will. It would be appreciated.

Then, the open subject is: "What are the pains you encounter? How would do have them resolved?"

Regards,
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Best Python Books for Starters and more Advanced m0dev 5 11,127 Mar-02-2022, 02:21 PM
Last Post: Haroldmorris
  New Advanced SQLAlchemy tutorial Added Larz60+ 0 1,756 Jun-11-2021, 02:34 AM
Last Post: Larz60+
  What book/course do you recommend for an "advanced" beginner? Edmond 3 2,342 Jan-22-2021, 04:12 PM
Last Post: BashBedlam

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020