httpx
Package — HTTPPython 3.8+Intermediate
Modern HTTP client with async support, HTTP/2, requests-like API
Quick Info
- Documentation
- Official Docs
- Python Version
- 3.8+
- Dependencies
- httpcore, certifi, idna, sniffio, anyio
- Install
pip install httpx
Learn by Difficulty
Quick Example
python
# Install: pip install httpx import httpx # Synchronous response = httpx.get("https://api.github.com") print(response.status_code) # Async import asyncio async def main(): async with httpx.AsyncClient() as client: resp = await client.get("https://api.github.com") print(resp.json()) asyncio.run(main())
httpx is a third-party package. Modern HTTP client with async support, HTTP/2, requests-like API. Install with: pip install httpx
Try in PlaygroundTags
packagehttpclientasyncmodern