Back to skills
SKILL.md
Python Async Patterns
ASecurityUse when implementing async Python patterns.
- 2 stars
- 0 votes
- 0 copies
- 2 views
- Added September 10, 2026
Works with
Security analysis
100/100npx -y skills add LoopyLuci/Skills --skill python-async-patterns --agent claude-codeAre you the author of Python Async Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/loopyluci-python-async-patterns)---
name: python-async-patterns
description: "Use when implementing async Python patterns."
version: 1.0.0
author: Hermes Agent
license: MIT
metadata:
hermes:
tags: [python, async, asyncio, coroutines, tasks, event-loop]
related_skills: [cross-thread-async, python-asyncio-gui-threading, data-pipeline-streaming]
---
# Python Async Patterns
Implementing async Python — from asyncio patterns through concurrency, async context managers, and async generators.
## When to Use
- Writing async Python code
- Managing asyncio tasks and event loops
- Building async APIs and data pipelines
## Async Patterns
```python
import asyncio
async def fetch_all(urls):
async with aiohttp.ClientSession() as session:
tasks = [fetch_one(session, url) for url in urls]
return await asyncio.gather(*tasks)
class AsyncCounter:
"""Async context manager pattern."""
def __init__(self, limit): self.limit = limit
async def __aenter__(self): return self
async def __aexit__(self, *e): await self.close()
async def close(self): pass
```
## Verification Checklist
- [ ] Async context managers for resources
- [ ] Task groups for structured concurrency (Python 3.11+)
- [ ] asyncio.gather with return_exceptions=True
- [ ] Semaphore for limiting concurrent tasks
- [ ] Proper cancellation handling
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.