Skip to content

petrarca/python-fastapi-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI Application Template

A minimal FastAPI application template with a modern project structure.

Features

  • FastAPI for modern API development
  • Jinja2 Templates for server-side rendering
  • Modern Project Structure with src layout
  • Task-based Workflow using Taskfile.yml
  • Code Quality Tools: Ruff for formatting and linting
  • Dependency Management: UV for fast package installation

Setup

Install dependencies

# Install uv if not already installed
curl -sSf https://astral.sh/uv/install.sh | sh

# Install dependencies
uv pip install -e .

Development dependencies

uv pip install -e ".[dev]"

Running the application

The project uses Task for common operations:

# Run with auto-reload for development
task run:dev

# Run without auto-reload for production
task run

# Run with custom options
task run:custom -- --host 127.0.0.1 --port 5000 --no-reload

If you prefer to run directly with Python:

python -m src.app.main

View all available options:

python run.py --help

Or directly with uvicorn:

uvicorn app.main:app --reload

API Documentation

Once the application is running, you can access:

About

A minimal FastAPI application template with HTML templates, static files, and API routes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published