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.12To install Copier, use uv or pipx:
uv tool install copier --with copier-templates-extensionsOr with pipx:
pipx install copier
pipx inject copier copier-templates-extensionsTo generate a project, run one of the following commands:
copier copy --trust "https://github.com/heshinth/fastapi-uv-template" /path/to/your/new/projectOr with a shorter command:
copier copy --trust "gh:heshinth/fastapi-uv-template" /path/to/your/new/projectYou 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/projectReplace /path/to/your/new/project with the desired path for your project.
cd /path/to/your/new/projectInstall the project dependencies using uv:
uv syncuv run fastapi dev ./app/main.pyYour FastAPI application will be running at http://127.0.0.1:8000.