본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)48k · #4599

fastapi-router-py

하는 일

이 코드는 정보를 처리하고 체계적이고 안전하게 유지하는 웹사이트나 웹 애플리케이션의 부분을 만드는 데 도움을 줍니다. 데이터를 받고 보내는 방식과 접근 권한을 정의합니다.

사용하는 경우

  • ✓웹사이트의 새 섹션을 만들 때.
  • ✓로그인이나 권한 기능을 추가할 때.
  • ✓사용자에게 보여 줄 데이터를 정리할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/fastapi-router-py/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/fastapi-router-py/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 앱에 사용자를 관리하는 새 섹션을 만들어 주세요. 안전한 로그인과 사용자 목록 표시가 필요합니다.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

템플릿을 사용해 데이터 구조를 정의하고, 인증된 사용자만 특정 정보에 접근하도록 규칙을 설정합니다. 또한 작업이 성공했는지 알려 주는 상태 코드를 설정합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Bundled upstream support

Supporting files are included at skill-relative paths. See UPSTREAM-NOTICE.md for their pinned sources, licenses, hashes, and import changes.

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

# 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

@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

@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.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
자주 묻는 질문

「라우터」란 무엇인가요?

건물의 층이나 방처럼 각각 특정 기능을 가진 구역입니다. 코드에서는 웹 애플리케이션의 여러 부분을 정리합니다.

「인증」이란 무엇인가요?

사용자가 본인이 맞는지 확인하는 과정입니다. 사용자 이름과 비밀번호로 로그인하는 것이 그 예입니다.

「응답 모델」이란 무엇인가요?

사용자에게 다시 보내지는 데이터의 모양과 내용을 정의하는 양식과 같습니다. 일관성을 보장합니다.

상세 정보

작성자의 원본 설명

Create FastAPI routers following established patterns with proper authentication, response models, and HTTP status codes.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4599
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬