This repository contains a FastAPI demonstration project. Follow the instructions below to set up and run the application.
- Python 3.13.3 (latest version)
- Git
Git Bash:
git clone https://github.com/JinLeeGG/FastAPI.gitCommand Prompt:
cd FastAPIOpen a Command Prompt and run:
python -m venv venvcd venv\Scriptsactivate.batsource venv/bin/activate.batWith the virtual environment activated, install the required packages:
pip install fastapi
pip install "uvicorn[standard]"
pip install jinja2- Make sure you're in the project directory where
main.pyis located - Start the application with:
uvicorn main:app --reload- The web application will be available at:
- Main URL: http://127.0.0.1:8000/
- Interactive API documentation (Swagger UI): http://127.0.0.1:8000/docs
- Alternative API documentation: http://127.0.0.1:8000/redoc
The --reload flag enables auto-reload, so the server will restart automatically when you make changes to the code.
FastAPI automatically generates interactive API documentation:
- Swagger UI: http://127.0.0.1:8000/docs
- ReDoc: http://127.0.0.1:8000/redoc