This is a simple FastAPI application to demonstrate setting up a FastAPI project in Python.
-
Create a virtual environment:
python -m venv venv(Windows)python3 -m venv venv(macOS/Linux)
-
Activate the virtual environment:
venv\Scripts\activate(Windows)source venv/bin/activate(macOS/Linux)
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
uvicorn main:app --reload
-
Open your browser and go to
http://127.0.0.1:8000.