home / skills / feiwanghub / playground / fastapi-templates-skill
/skills/.trae/skills/fastapi-templates-skill
This skill quickly scaffolds a boilerplate FastAPI project with main.py, requirements, and README, including hello world and item endpoints.
npx playbooks add skill feiwanghub/playground --skill fastapi-templates-skillReview the files below or copy the command above to add this skill to your agents.
---
name: fastapi-templates-skill
description: "Scaffold new FastAPI projects with standard directory structure and configuration."
---
# FastAPI Templates Skill
This skill allows you to quickly generate a boilerplate FastAPI project.
## Capabilities
- Create a new directory with `main.py`, `requirements.txt`, and `README.md`.
- Includes a basic "Hello World" endpoint and item lookup endpoint.
## Usage
Create a new project:
```bash
python3 .shared/fastapi-templates-skill/scripts/create_fastapi.py "my-api-project"
```
This skill scaffolds a new FastAPI project with a standard, production-ready directory layout and basic configuration files. It generates an entry point, dependency list, and documentation stub so you can start building API endpoints immediately. The output is minimal and focused on common FastAPI patterns to reduce repetitive setup work.
Running the provided script creates a project folder containing main.py with a Hello World endpoint and an item lookup endpoint, a requirements.txt listing core dependencies, and a README.md with quick start instructions. The scaffold follows a simple, extensible structure so you can add routers, models, and tests without reworking the layout. Generated files are plain text and easy to customize to your team’s conventions.
What files does the scaffold create?
It creates main.py with example endpoints, requirements.txt, and README.md in a new project folder.
How do I run the generated app?
Install dependencies from requirements.txt in a virtual environment and run the app with Uvicorn, e.g., uvicorn main:app --reload.