async-python-patterns
Master Async Python Patterns
๋ํ ๋ค์์์ ์ฌ์ฉํ ์ ์์ต๋๋ค: ActiveInferenceInstitute
Build high-performance Python applications with async/await patterns. Learn concurrent programming techniques for scalable I/O-bound systems.
์คํฌ ZIP ๋ค์ด๋ก๋
Claude์์ ์ ๋ก๋
์ค์ โ ๊ธฐ๋ฅ โ ์คํฌ โ ์คํฌ ์ ๋ก๋๋ก ์ด๋
ํ ๊ธ์ ์ผ๊ณ ์ฌ์ฉ ์์
ํ ์คํธํด ๋ณด๊ธฐ
"async-python-patterns" ์ฌ์ฉ ์ค์ ๋๋ค. Show me how to fetch multiple URLs concurrently with timeout handling
์์ ๊ฒฐ๊ณผ:
- Use asyncio.gather() with asyncio.wait_for() for timeout control
- Create aiohttp ClientSession with connection pooling
- Handle both successful responses and timeouts gracefully
- Return results with status codes and error information
"async-python-patterns" ์ฌ์ฉ ์ค์ ๋๋ค. How do I implement a rate limiter for API calls
์์ ๊ฒฐ๊ณผ:
- Use asyncio.Semaphore to limit concurrent requests
- Apply semaphore with async context manager pattern
- Set appropriate max_concurrent value based on API limits
- Combine with retry logic for robustness
"async-python-patterns" ์ฌ์ฉ ์ค์ ๋๋ค. What are common mistakes when writing async Python code
์์ ๊ฒฐ๊ณผ:
- Forgetting to await coroutines - they return coroutine objects, not results
- Using time.sleep() instead of asyncio.sleep() - blocks the event loop
- Not handling task cancellation with try/except CancelledError
- Mixing sync and async code without proper wrapping
๋ณด์ ๊ฐ์ฌ
์์ Documentation-only skill containing Python async programming patterns. Static analyzer flagged 77 findings, all confirmed as false positives. Markdown code fences were misidentified as shell backticks. Documentation text was misidentified as cryptographic algorithms. Example URLs are standard placeholders. No executable code, network access, or security risks exist.
์ํ ์์ธ
๐ ๋คํธ์ํฌ ์ ๊ทผ (10)
โ๏ธ ์ธ๋ถ ๋ช ๋ น์ด (48)
ํ์ง ์ ์
๋ง๋ค ์ ์๋ ๊ฒ
Build Async Web APIs
Create FastAPI and aiohttp applications with proper async patterns for handling concurrent requests
Concurrent Data Processing
Implement parallel I/O operations for database queries, file processing, and API calls
Async Automation Scripts
Write efficient automation tools that handle multiple network operations concurrently
์ด ํ๋กฌํํธ๋ฅผ ์ฌ์ฉํด ๋ณด์ธ์
Show me how to create a simple async function that fetches data with asyncio.sleep() to simulate network delay
Demonstrate how to make 10 HTTP requests concurrently using asyncio.gather() with proper error handling
Create a producer-consumer pattern using asyncio.Queue for processing 100 items with 5 workers
Design an async WebSocket server that handles multiple clients and broadcasts messages to all connected users
๋ชจ๋ฒ ์ฌ๋ก
- Always use asyncio.run() as the entry point for async applications
- Implement proper error handling with try/except blocks in async functions
- Use connection pools and semaphores to limit concurrent operations
ํผํ๊ธฐ
- Never use time.sleep() in async code - always use asyncio.sleep()
- Do not forget to await coroutines or they will not execute
- Avoid mixing blocking I/O operations with async code
์์ฃผ ๋ฌป๋ ์ง๋ฌธ
Which Python versions support asyncio?
When should I use async versus threads?
Can I use async with Django?
How do I debug async code?
What is the difference between create_task and gather?
Is this skill compatible with Jupyter notebooks?
๊ฐ๋ฐ์ ์ธ๋ถ ์ ๋ณด
์์ฑ์
wshobson๋ผ์ด์ ์ค
MIT
๋ฆฌํฌ์งํ ๋ฆฌ
https://github.com/wshobson/agents/tree/main/plugins/python-development/skills/async-python-patterns์ฐธ์กฐ
main
ํ์ผ ๊ตฌ์กฐ
๐ SKILL.md