This repository contains a simple FastAPI tutorial that demonstrates JWT-based authentication. The full implementation lives in main.py.
- (Optional) Create a virtual environment in the project root with
python -m venv .venv. - Activate it using
source .venv/bin/activateon macOS/Linux or.venv\Scripts\Activate.ps1in Windows PowerShell. - Install the required packages via
pip install -r requirements.txt.
- Start the development server with
uvicorn main:app --reload. - If you see a version-related error from
uvicorn, trypython -m uvicorn main:app --reloadinstead. - Request a token from
/login, then try/users/meand/secretto walk through the JWT flow.
The screenshots below are stored under figs/ and show the recommended order of the walkthrough.


