fastapi-router-py
/fastapi-router-py
Tworzy routery FastAPI z operacjami CRUD, zależnościami uwierzytelniania i poprawnymi modelami odpowiedzi, przy budowie endpointów REST i nowych tras.
- Autor
- rootcastleco ↗
- Repozytorium
- rei-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 27.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Tworzy routery FastAPI z operacjami CRUD, zależnościami uwierzytelniania i poprawnymi modelami odpowiedzi, przy budowie endpointów REST i nowych tras.
Oryginalny opis (EN)
Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or add...
Jak działa
- Quick Start
- Authentication Patterns
- Response Models
- HTTP Status Codes
- Integration Steps
- When to Use
Podgląd SKILL.md
---
name: fastapi-router-py
description: "Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or add..."
risk: unknown
source: rootcastle-rei
---
# FastAPI Router
Create FastAPI routers following established patterns with proper authentication, response models, and HTTP status codes.
## Quick Start
Copy the template from assets/template.py and replace placeholders:
- `{{ResourceName}}` → PascalCase name (e.g., `Project`)
- `{{resource_name}}` → snake_case name (e.g., `project`)
- `{{resource_plural}}` → plural form (e.g., `projects`)
## Authentication Patterns
```python
# Optional auth - returns None if not authenticated
current_user: Optional[User] = Depends(get_current_user)
# Required auth - raises 401 if not authenticated
current_user: User = Depends(get_current_user_required)
```
## Response Models
```python
@router.get("/items/{item_id}", response_model=Item)
async def get_item(item_id: str) -> Item:
...
@router.get("/items", response_model=list[Item])
async def list_items() -> list[Item]:
...
```
## HTTP Status Codes
```python
@router.post("/items", status_code=status.HTTP_201_CREATED)
@router.delete("/items/{id}", status_code=status.HTTP_204_NO_CONTENT)
```
## Integration Steps
1. Create router in `src/backend/app/routers/`
2. Mount in `src/backend/app/main.py`
3. Create corresponding Pydantic models
4. Create service layer if needed
5. Add frontend API functions
## When to Use
This skill is applicable to execute the workflow or actions described in the overview.
---
> 🏰 **Rei Skills** — Curated by [Rootcastle Engineering & Innovation](https://www.rootcastle.com) | Batuhan Ayrıbaş
> Engineering Beyond Boundaries | admin@rootcastle.com
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · rootcastleco/rei-skills | 100 | MIT |
| microsoft/skills | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 19ed281fe2c8 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100fastapi-router-creator
Prawdopodobnie tworzy routery FastAPI w ramach rozwoju backendu na podstawie nazwy skilla i kategorii. - 92crud-endpoints
Podpowiada, gdzie i jak dodać endpoint CRUD w serwerze repozytorium: routery, middleware, ActionsEnum i rejestrację tras. - 100fastapi
Pomaga budować API w FastAPI: REST, walidacja, zależności, modele Pydantic, wstrzykiwanie zależności i uwierzytelnianie OAuth2 i JWT. - 86fastapi
Pomaga budować projekty FastAPI: REST API, asynchroniczne endpointy, modele Pydantic i usługi backendowe. - 95fastapi-validation
Opisuje walidację w FastAPI z modelami Pydantic, do budowy typobezpiecznych API z solidną walidacją żądań i odpowiedzi. - 100fastapi-async-patterns
Buduje asynchroniczne API FastAPI z wstrzykiwaniem zależności i wzorcami serwisów, dla typowanych endpointów.