Python Tutorial #19: HTTP and APIs — Requests, httpx, and REST

In the previous tutorial, we learned about async/await and asyncio. Now let’s learn about HTTP requests and APIs — how to call REST APIs, send data, handle responses, and build a reusable API client. Almost every Python application talks to an API at some point. Weather data, payment processing, social media, databases — they all use HTTP. By the end of this tutorial, you will know how to make HTTP requests, handle errors, and build a clean API client. ...

April 29, 2026 · 8 min