Skip to main content

Python-httpx Vs Python-requests

·67 words·1 min
Blogger async python
Table of Contents
#!/usr/bin/evn python3
# -*- coding: utf-8 -*-

import asyncio
import httpx
import requests

Requests vs HTTPX
#

In general, both the module are similar, Here, I just make a simple comparison on what are the differences between Python HTTPX and Requests module.

RequestsHTTPX
Sessionsrequests.Session()httpx.Client()
Async supportnot supportedhttpx.AsyncClient()
HTTP/2 supportnot supportedhttpx.Client(http2=True)
httpx.AsyncClient(http2=True)

Links#

Related

MS Patch Tuesday
·307 words·2 mins
Blogger Essential cli patchtuesday python
To get vulnerability stats and updates for Patch Tuesday from MSRC.
Multipass
·659 words·4 mins
Blogger cli multipass
Orchestrates virtual Ubuntu instances with Multipass.
Goodhart's Law
·13 words·1 min
Blogger qotd
When a measure becomes a target, it ceases to be a good measure.