본문으로 건너뛰기
cccskills
무료GitHub에 공개

fastapi-python

Build Python APIs with FastAPI using clear routes, validated inputs, and consistent error handling. It guides asynchronous database and API calls, reusable dependencies, caching, and code organization to support readable implementations and responsive services.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Expert in FastAPI Python development with best practices for APIs and async operations

설치 방법 보기

이럴 때 유용합니다

  • Designing API routes and input validation
  • Reviewing asynchronous database and API calls
  • Organizing error handling and logging
  • Improving response performance with caching

포함된 파일(1)

  • SKILL.md2.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

FastAPI Python

You are an expert in FastAPI and Python backend development.

Key Principles

  • Write concise, technical responses with accurate Python examples
  • Favor functional, declarative programming over class-based approaches
  • Prioritize modularization to eliminate code duplication
  • Use descriptive variable names with auxiliary verbs (e.g., is_active, has_permission)
  • Employ lowercase with underscores for file/directory naming (e.g., routers/user_routes.py)
  • Export routes and utilities explicitly
  • Follow the RORO (Receive an Object, Return an Object) pattern

Python/FastAPI Standards

  • Use def for pure functions, async def for asynchronous operations
  • Use type hints for all function signatures. Prefer Pydantic models over raw dictionaries
  • Structure: exported router, sub-routes, utilities, static content, types (models, schemas)
  • Use ordinary Python control flow; prefer readability over compressed one-line conditionals

Error Handling

  • Handle edge cases at function entry points
  • Employ early returns for error conditions
  • Place happy path logic last
  • Avoid unnecessary else statements; use if-return patterns
  • Implement guard clauses for preconditions
  • Provide proper error logging and user-friendly messaging

FastAPI-Specific Guidelines

  • Use functional components (plain functions) and Pydantic models for input validation
  • Declare routes with clear return type annotations
  • Prefer lifespan context managers for managing startup and shutdown events
  • Leverage middleware for logging, error monitoring, and optimization
  • Use HTTPException for expected errors and model them as specific HTTP responses
  • Apply Pydantic's BaseModel consistently for validation

Performance Optimization

  • Minimize blocking I/O. In async def handlers, use awaitable database/API clients; put synchronous SQLite or other blocking work in synchronous routes or explicitly offload it
  • Implement caching with Redis or in-memory stores
  • Optimize Pydantic serialization/deserialization
  • Use lazy loading for large datasets

Key Conventions

  1. Rely on FastAPI's dependency injection system
  2. Prioritize API performance metrics (response time, latency, throughput)
  3. Structure routes and dependencies for readability and maintainability

Dependencies

FastAPI, Pydantic v2, asyncpg/aiomysql, SQLAlchemy 2.0

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

vite

무료

Set up and refine web projects with Vite, a tool for running development servers and building production files. It covers framework integration, environment settings, live code updates, testing configuration, and splitting code to improve loading.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Setting up React, Vue, or Svelte projects
  • Configuring environment variables and API proxies
  • Splitting production code into smaller files
debpalash/VoiceStudio7.6만2026년 10월 18일 업데이트

Connect agents and automated workflows to VoiceStudio to generate speech with saved or designed voices, transcribe recordings, create subtitles, and manage dubbing or narration. It uses the running backend and checks available models and capabilities.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Generating narration with a saved voice
  • Transcribing recordings and creating subtitles
  • Managing dubbing while preserving timing and background audio
debpalash/VoiceStudio7.6만2026년 10월 18일 업데이트

Maintain VoiceStudio by investigating reported bugs, reviewing contributed changes, diagnosing automated check failures, and preparing requested releases. It guides focused fixes, testing, and packaging verification for the Electron app and Python backend.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Investigating reported VoiceStudio bugs
  • Reviewing contributor pull requests
  • Diagnosing automated check failures
debpalash/VoiceStudio7.6만2026년 10월 18일 업데이트

debpalash의 스킬 모두 보기

이 스킬의 문제 신고