Skip to content

cmdtorch/fastapi_app_template

Repository files navigation

🌟 FastAPI Project Starter

Welcome to the 🚀 FastAPI Project Starter! This guide will help you set up and run your FastAPI project quickly and efficiently. It covers essential topics like 🔧 installation, 📦 dependencies, and 🖥️ running the development server.

✨ Features

  • 📂 Repository management
  • 🔐 Authentication
  • 🛡️ Middlewares (session)
  • ⚠️ Exception handling
  • 🛠️ SQLAlchemy
  • 🧪 Pytest

⚙️ Installation

🔽 Install uv (Optional)

The uv tool simplifies 📋 dependency management and running the development server. Follow the steps below to install it based on your 🖥️ operating system:

🪟 For Windows

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

🐧 For Linux and 🍎 macOS

Using curl:

curl -LsSf https://astral.sh/uv/install.sh | sh

Using wget:

wget -qO- https://astral.sh/uv/install.sh | sh

ℹ️ Note: For more details or troubleshooting, visit the official UV installation documentation.


📦 Install Dependencies

Using uv:

uv sync

Using pip:

pip install -r requirements.txt

▶️ Running the Server

Using uv:

uv run fastapi dev

Using fastapi-cli:

fastapi dev

Using uvicorn directly:

uvicorn app.main:app

Once the server is running, your application will be served at: