Skip to content
Back to skills

Python Async Patterns

ASecurity

Use when implementing async Python patterns.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 10, 2026
ai-agentspythonapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add LoopyLuci/Skills --skill python-async-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Async Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Async Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/loopyluci-python-async-patterns/badge)](https://www.skillsdirectory.com/skills/loopyluci-python-async-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.