Installation and setup
Every lesson in this course runs from one project folder with four packages installed. This lesson installs them and checks the version.
FastAPI, httpx2, uvicorn and pytest
Make a folder for the course and install the packages. FastAPI builds APIs. httpx2 sends HTTP requests from Python. uvicorn is the server that runs a FastAPI app so other programs can reach it, and pytest runs the tests in lesson 18. Pinning the versions means your output matches the lessons.
pip install "fastapi==0.141.1" "httpx2==2.13.0" "uvicorn==0.53.0" pytestfrom importlib.metadata import version
print(version("fastapi"))Where API keys live
Model APIs identify you with a key sent in a request header. Your code reads the key from an environment variable rather than containing it. Lesson 11 builds that check on both sides, using MODEL_API_KEY for the course's own model API; a hosted provider works the same way with its own variable, such as OPENAI_API_KEY.
export MODEL_API_KEY=sk-local-123Lesson 11 reads it with os.environ. Keep real keys in a .env file that is listed in .gitignore, never in the code itself. The model API in this course is one you build in lesson 10, so no provider account is needed.
- Run
pip listand find the four packages.
Little by little, you're building something great.