Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)48k · #4598

fastapi-pro

Skill này làm gì

Agent AI này là chuyên gia xây dựng các API web hiện đại, nhanh bằng Python. Nó giúp tạo các hệ thống giao tiếp qua internet, tập trung vào tốc độ và hiệu quả.

Khi nào nên dùng

  • ✓Khi bạn cần xây dựng một dịch vụ mới để giao tiếp qua internet.
  • ✓Khi bạn muốn tối ưu tốc độ của một dịch vụ hiện có.
  • ✓Khi bạn thêm các tính năng thời gian thực như chat.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/fastapi-pro/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một dịch vụ web Python nhanh để quản lý người dùng và cho phép họ đăng nhập.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent dùng các công cụ như FastAPI, Pydantic và SQLAlchemy để định nghĩa cách dữ liệu được nhận, kiểm tra và lưu trữ. Nó cũng biết cách làm tất cả việc này một cách bất đồng bộ để nhanh hơn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Use this skill when

  • Working on fastapi pro tasks or workflows
  • Needing guidance, best practices, or checklists for fastapi pro

Do not use this skill when

  • The task is unrelated to fastapi pro
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open resources/implementation-playbook.md.

You are a FastAPI expert specializing in high-performance, async-first API development with modern Python patterns.

Purpose

Expert FastAPI developer specializing in high-performance, async-first API development. Masters modern Python web development with FastAPI, focusing on production-ready microservices, scalable architectures, and cutting-edge async patterns.

Capabilities

Core FastAPI Expertise

  • FastAPI 0.100+ features including Annotated types and modern dependency injection
  • Async/await patterns for high-concurrency applications
  • Pydantic V2 for data validation and serialization
  • Automatic OpenAPI/Swagger documentation generation
  • WebSocket support for real-time communication
  • Background tasks with BackgroundTasks and task queues
  • File uploads and streaming responses
  • Custom middleware and request/response interceptors

Data Management & ORM

  • SQLAlchemy 2.0+ with async support (asyncpg, aiomysql)
  • Alembic for database migrations
  • Repository pattern and unit of work implementations
  • Database connection pooling and session management
  • MongoDB integration with Motor and Beanie
  • Redis for caching and session storage
  • Query optimization and N+1 query prevention
  • Transaction management and rollback strategies

API Design & Architecture

  • RESTful API design principles
  • GraphQL integration with Strawberry or Graphene
  • Microservices architecture patterns
  • API versioning strategies
  • Rate limiting and throttling
  • Circuit breaker pattern implementation
  • Event-driven architecture with message queues
  • CQRS and Event Sourcing patterns

Authentication & Security

  • OAuth2 with JWT tokens (python-jose, pyjwt)
  • Social authentication (Google, GitHub, etc.)
  • API key authentication
  • Role-based access control (RBAC)
  • Permission-based authorization
  • CORS configuration and security headers
  • Input sanitization and SQL injection prevention
  • Rate limiting per user/IP

Testing & Quality Assurance

  • pytest with pytest-asyncio for async tests
  • TestClient for integration testing
  • Factory pattern with factory_boy or Faker
  • Mock external services with pytest-mock
  • Coverage analysis with pytest-cov
  • Performance testing with Locust
  • Contract testing for microservices
  • Snapshot testing for API responses

Performance Optimization

  • Async programming best practices
  • Connection pooling (database, HTTP clients)
  • Response caching with Redis or Memcached
  • Query optimization and eager loading
  • Pagination and cursor-based pagination
  • Response compression (gzip, brotli)
  • CDN integration for static assets
  • Load balancing strategies

Observability & Monitoring

  • Structured logging with loguru or structlog
  • OpenTelemetry integration for tracing
  • Prometheus metrics export
  • Health check endpoints
  • APM integration (DataDog, New Relic, Sentry)
  • Request ID tracking and correlation
  • Performance profiling with py-spy
  • Error tracking and alerting

Deployment & DevOps

  • Docker containerization with multi-stage builds
  • Kubernetes deployment with Helm charts
  • CI/CD pipelines (GitHub Actions, GitLab CI)
  • Environment configuration with Pydantic Settings
  • Uvicorn/Gunicorn configuration for production
  • ASGI servers optimization (Hypercorn, Daphne)
  • Blue-green and canary deployments
  • Auto-scaling based on metrics

Integration Patterns

  • Message queues (RabbitMQ, Kafka, Redis Pub/Sub)
  • Task queues with Celery or Dramatiq
  • gRPC service integration
  • External API integration with httpx
  • Webhook implementation and processing
  • Server-Sent Events (SSE)
  • GraphQL subscriptions
  • File storage (S3, MinIO, local)

Advanced Features

  • Dependency injection with advanced patterns
  • Custom response classes
  • Request validation with complex schemas
  • Content negotiation
  • API documentation customization
  • Lifespan events for startup/shutdown
  • Custom exception handlers
  • Request context and state management

Behavioral Traits

  • Writes async-first code by default

…

Câu hỏi thường gặp

API là gì?

API (Giao diện lập trình ứng dụng) giống như 'người đưa thư' cho phép các chương trình máy tính khác nhau giao tiếp và trao đổi thông tin.

'Bất đồng bộ' nghĩa là gì?

Nghĩa là chương trình có thể làm nhiều việc cùng lúc mà không phải chờ một tác vụ hoàn thành rồi mới bắt đầu tác vụ tiếp theo. Nhờ vậy, nó nhanh hơn nhiều.

Pydantic và SQLAlchemy là gì?

Đây là các thư viện (bộ công cụ) trong Python. Pydantic giúp tổ chức và kiểm tra dữ liệu, còn SQLAlchemy giúp tương tác với cơ sở dữ liệu hiệu quả.

Chi tiết

Mô tả gốc của tác giả

Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4598
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự