python-frameworks
Use when building, reviewing, or choosing Python web or task frameworks, and the task calls for Django, FastAPI, or Celery patterns.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- python-frameworks
- license
- MIT
- metadata
- { "owner": "Harley Bartles", "status": "active", "use_when": [ "building or reviewing Django applications.", "designing FastAPI services.", "adding Celery task queues.", "choosing between Django, FastAPI, and Celery for a component." ], "source-id": "python-frameworks", "source-path": "skills/python-frameworks/SKILL.md", "related_skills": [ "python", "typescript", "database-engines" ], "do_not_use_when": [ "the question is about pure Python language patterns (see python).", "another framework-specific skill owns the task." ], "provenance-name": "Python Frameworks first-party skill", "source-category": "first_party" }
- description
- Use when building, reviewing, or choosing Python web or task frameworks, and the task calls for Django, FastAPI, or Celery patterns.
02 资源文件 5
- 参考文档agents/openai.yaml378 B
- 资产文件assets/authority/authority.yaml880 B
- 资产文件assets/authority/CITATIONS.md1.1 KB
- 资产文件assets/authority/source-map.yaml395 B
- 参考文档references/operational-guidance.md1.8 KB
03 SKILL.md 正文
Python Frameworks
Use this skill when choosing or applying Python web and task-queue frameworks.
When to Use
- Building or reviewing Django applications.
- Designing FastAPI APIs and services.
- Adding Celery background tasks or scheduled jobs.
- Choosing among Django, FastAPI, and Celery for a component.
Core Pattern
- Choose Django for full-stack server-rendered or admin-heavy applications that need an ORM, migrations, and batteries-included conventions.
- Choose FastAPI for API-first services that benefit from async endpoints, automatic OpenAPI docs, and Pydantic validation.
- Use Celery to offload work to background workers when the response path must stay fast; broker with Redis or RabbitMQ and use result backends only when callers need results.
- Keep framework code decoupled from business rules; put domain logic in services, models, or repositories and call it from views or tasks.
- Test at the framework boundary with the FastAPI
TestClientor Django test client; unit-test domain logic without loading the framework.
Common Mistakes
- Putting business logic directly in views or tasks. → Move it to services or domain modules.
- Using Celery for synchronous, latency-sensitive work. → Keep real-time work in the request path or use async APIs.
- Mixing sync and async ORM calls in FastAPI. → Use async engines and sessions or route sync calls through executors.
- Ignoring Django migrations in tests. → Run migrations and use fixtures that reflect schema state.
Load references/operational-guidance.md for deeper Django, FastAPI, and Celery patterns.
04 同仓库更多 Skills
writing
Use when drafting, revising, or reviewing prose for human readers and clarity, an authorised voice, or reader-fatigue concerns may interact.
writing-with-clarity
Use when drafting, revising, or reviewing prose intended for human readers, including documentation, README files, reports, explanations, UI copy, errors, comments, commit messages, and pull request text.
writing-style
Use when revising or reviewing human-facing prose against an authorised voice card or a contextual reader-fatigue profile.
skill
暂无简介
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment.
writing-roadmaps
Use when a goal is too large for one writing-plans plan and requires a sequenced roadmap of consecutive plans.