Lesson 42 / 49
Popular Packages at a Glance
Survey popular Python packages such as requests, pandas, FastAPI and pytest, and fetch API data with requests.
The ecosystem map
requests — simple HTTP calls. numpy/pandas — numerical & tabular data. flask/django/fastapi — web backends. pytest — testing.
requests in one line
A one-line taste of requests — fetching data from an API without writing raw socket code.
import requests
response = requests.get("https://api.github.com")
print(response.status_code) # 200
print(response.json().keys())