Concept
Programs talk to web services by sending HTTP requests and reading the response: a status code, headers and a body. The requests library makes this a few lines.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show HTTP requests doing its job.
import requests
response = requests.get(
"https://api.github.com/repos/python/cpython",
params={"per_page": 1},
timeout=10,
)
print(response.status_code) # 200
print(response.headers["content-type"])
print(response.json()["stargazers_count"])Calling requests.get() without a timeout. The default is to wait forever, so one slow server can hang your whole program.
Your roadmap puts these before HTTP requests, unless you already know them.
Once a session shows you understand HTTP requests, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.
Topics that build on HTTP requests.