A template for building LLM-powered applications with Python. This is the variant of the LLM Engineering Template that is not using copier but instead using a setup script which is better if you want to use the github template feature.
- 🚀 FastAPI backend with automatic OpenAPI docs
- 🔍 Phoenix for LLM observability and tracing
- 📦 uv for fast, reliable package management
- 🛠️ Pre-commit hooks with Ruff, mypy, and more
- 🐳 Docker support with compose
- 📚 MkDocs documentation setup
- ✅ pytest with coverage reporting
- Click the "Use this template" button above to create your repo
- Clone your new repository
- Run the setup script:
./setup.shThe script will prompt you for:
- Module name (e.g.,
my_ai_app) - Your name and email
- Python version (default: 3.13)
- Click "Use this template" to create your repo
- Clone your new repository
- Replace placeholders:
# Replace module name (use your actual module name)
find . -type f \( -name "*.py" -o -name "*.toml" -o -name "*.yml" -o -name "*.yaml" -o -name "Makefile" -o -name "Dockerfile" \) \
-not -path "./.git/*" \
-exec sed -i '' 's/your_module_name/my_project/g' {} +
# Rename the source directory
mv src/your_module_name src/my_project
# Update author info in pyproject.toml and LICENSE- Install and run:
uv sync
cp template.env .env # Edit with your API keys
uv run pre-commit install
make test.
├── src/your_module_name/ # Main application code
│ ├── api/ # FastAPI endpoints
│ ├── llm.py # LLM integration
│ ├── settings.py # Configuration
│ └── instrumentation.py # Observability setup
├── tests/ # Test suite
├── docs/ # Documentation
├── Makefile # Development commands
└── docker-compose.yml # Container orchestration| Command | Description |
|---|---|
make setup |
Install dependencies and hooks |
make style |
Run linting and formatting |
make test |
Run tests with coverage |
make mypy |
Run type checking |
make start_backend |
Start FastAPI server |
make restart |
Rebuild and restart Docker |
| Technology | Purpose |
|---|---|
| uv | Fast Python package manager |
| FastAPI | Modern web framework |
| LiteLLM | Universal LLM API |
| Phoenix | LLM observability |
| Loguru | Logging |
| Pydantic | Data validation |
MIT License - see LICENSE for details.
🔗 Related Links
- Copier version - For automated project generation