Before module 1 · Equipment Rental v0.1.0
Set up your first Equipment Rental API
Start with a small app you can run, change and test. This setup comes before the existing nine modules and 26 lessons; it does not add a completion requirement.
Try the browser companion
For modules 1–2, start without installing Python: Open module 1 browser lab. Keep Starting workspace selected, run /health and expect HTTP 200 with {"status":"ok"}. The equipment route initially returns 501; implement the response, then run target checks. Download your edited work before clearing browser storage.
This is a real async FastAPI companion. The synchronous endpoint taught in the first lesson and modules 3–9 use the local setup below. The lab explains its runtime limits before you run.
What you need for local setup
- Write Python functions and classes.
- Use basic terminal commands and Python virtual environments.
- Understand basic HTTP requests and responses.
- Python 3.13 and a terminal. Check with
python3.13 --version(Windows:py -3.13 --version). - A text editor and a browser. Modules 1–2 need no Docker, PostgreSQL, account, email service or paid API.
1. Download the starting project
Extract the starter into a new folder. The starter serves a welcome page and health response. Its equipment route returns 501 until you implement the first lesson. Keep your edits separate from the completed instructor solution.
Module 1 code · 0.1.0
Download starting workspace · Download completed instructor solution
The starter contains the minimal welcome/health app and this module's target checks. Attempt the exercises before comparing the instructor solution. Both downloads include a dependency lock, setup commands, expected results, reset guidance and a file manifest.
No Docker or database is needed for this module's local checks. Open the isolated async browser companion
2. Create a virtual environment
From the extracted equipment-rental folder, use these macOS/Linux commands:
python3.13 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.lock
Windows PowerShell: py -3.13 -m venv .venv, then .\.venv\Scripts\Activate.ps1. If your shell policy does not permit activation, use .\.venv\Scripts\python.exe directly. Use the same Python version and supplied lock on each platform. The current release checks ran in a Linux ARM64 container; a fresh macOS or Windows installation has not been verified.
3. Run and inspect the app
python -m uvicorn equipment.hello:app --host 127.0.0.1 --port 8000Open http://127.0.0.1:8000/: expect {"project":"Equipment Rental","version":"0.1.0"}. Open /health: expect {"status":"ok"}. Open /docs to inspect the HTTP contract. The local synchronous route uses FastAPI's normal server execution.
4. Stop, check and make one change
Stop the server with Ctrl-C. Run the starting checks:
python run_checks.pyThe welcome/health/configuration baseline passes; the equipment check is explicitly skipped in the starter. Follow the first lesson to implement GET /equipment/{equipment_id}, then run:
python run_checks.py --targetExpect success for /equipment/7, 422 for an invalid integer and 405 for a POST to the GET route. Read the assertions, then add your own availability route and test. A baseline pass does not establish that you completed the exercise.
If something fails
- Missing Python: install the selected Python version through the official Python downloads, then reopen your terminal.
- Import error: check your active virtual environment and install the supplied lock.
- Port occupied: stop your own running server or choose a different loopback port.
- Reset: save your edits, then extract the original starter into a new folder. Do not overwrite your work.
- PostgreSQL begins in module 3. Its checks use a new disposable local database and never an existing database.
The optional browser companion uses async handlers and in-process ASGI requests. It does not run a TCP server, the synchronous thread pool or PostgreSQL. Download remains the route for those lessons.