应用简介
全面指导使用asyncio实现异步Python应用程序,包括并发编程模式和async/await构建高性能、非阻塞系统。
--- name: async-python-patterns description: "Comprehensive guidance for implementing asynchronous Python applications using asyncio, concurrent programming patterns, and async/await for building high-performance, non-blocking systems." risk: safe source: community date_added: "2026-02-27" --- # Async Python Patterns Comprehensive guidance for implementing asynchronous Python applications using asyncio, concurrent programming patterns, and async/await for building high-performance, non-blocking systems. ## Use this skill when - Building async web APIs (FastAPI, aiohttp, Sanic) - Implementing concurrent I/O operations (database, file, network) - Creating web scrapers with concurrent requests - Developing real-time applications (WebSocket servers, chat systems) - Processing multiple independent tasks simultaneously - Building microservices with async communication - Optimizing I/O-bound workloads - Implementing async background tasks and queues ## Do not use this skill when - The workload is CPU-bound with minimal I/O. - A simple synchronous script is sufficient. - The runtime environment cannot support asyncio/event loop usage. ## Instructions - Clarify workload characteristics (I/O vs CPU), targets, and runtime constraints. - Pick concurrency patterns (tasks, gather, queues, pools) with cancellation rules. - Add timeouts, backpressure, and structured error handling. - Include testing and debugging guidance for async code paths. - If detailed examples are required, open `resources/implementation-playbook.md`. Refer to `resources/implementation-playbook.md` for detailed patterns and examples. ## Resources - `resources/implementation-playbook.md` for detailed patterns and examples. ## 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.
发布日期
5/16/2026
提供方
SkillOPIC
来源类型
导入
sickn33
other
数据安全
使用 Skill 时,您的对话内容将被发送至 AI 模型进行处理。我们会严格保护您的隐私数据,不会将您的对话内容用于模型训练或分享给第三方。 以下为此 Skill 的数据处理说明。
此 Skill 将处理您的对话输入
您的消息将作为 Prompt 上下文发送至 AI 模型
所有通信均通过加密通道传输
对话记录仅保存在本地
您可以随时清除本地对话历史,清除后数据不可恢复
评分和评价
已验证评分
Skill 信息
了解此 Skill 的详细信息和功能特性
其他
职场发展
文件结构
resources
SKILL.md2.0 KB
版本历史
- 公开
- 来源于用户导入
如需详细了解相关要求,请访问帮助中心,或给我们提交反馈信息