A FastAPI project template powered by Copier and uv.
To use this Copier template, you will need:
- Git v2
- Python 3
- Copier
To install Git version 2, follow the official instructions.
To install Python 3, download and install it from the official website, or install it with uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install 3.12
To install Copier, use uv or pipx:
uv tool install copier --with copier-templates-extensions
Or with pipx:
pipx install copier
pipx inject copier copier-templates-extensions
To generate a project, run one of the following commands:
copier copy --trust "https://github.com/heshinth/fastapi-uv-template" /path/to/your/new/project
Or with a shorter command:
copier copy --trust "gh:heshinth/fastapi-uv-template" /path/to/your/new/project
You can even generate a project without installing Copier, using uv:
uvx --with copier-templates-extensions copier copy --trust "gh:heshinth/fastapi-uv-template" /path/to/your/new/project
Replace /path/to/your/new/project with the desired path for your project.
cd /path/to/your/new/project
Install the project dependencies using uv:
uv sync
uv run fastapi dev ./app/main.py
Your FastAPI application will be running at http://127.0.0.1:8000.