Skip to content
Back to skills

Python Async

ASecurity

Async Python patterns via asyncio and aiohttp for I/O-bound concurrency. Use when adding async APIs, handling concurrent I/O, or debugging async code.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 12, 2026
ai-agentspythongofastapitestingdebugginggitapidatabaseperformance

Works with

  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned September 12, 2026

npx -y skills add thedixitjain/the-mega-skill-library --skill python-async --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Async?

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

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

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
description: "Async Python patterns via asyncio and aiohttp for I/O-bound concurrency. Use when adding async APIs, handling concurrent I/O, or debugging async code."
allowed-tools: "[]"
category: engineering-core
source_repo: athola/claude-night-market
source_path: "plugins/parseltongue/skills/python-async/SKILL.md"
source_url: https://github.com/athola/claude-night-market/blob/HEAD/plugins/parseltongue/skills/python-async/SKILL.md
---

# Async Python Patterns

asyncio and async/await patterns for Python applications.

## Quick Start

```python
import asyncio

async def main():
    print("Hello")
    await asyncio.sleep(1)
    print("World")

asyncio.run(main())
```

## When To Use

- Building async web APIs (FastAPI, aiohttp)
- Implementing concurrent I/O operations
- Creating web scrapers with concurrent requests
- Developing real-time applications (WebSockets)
- Processing multiple independent tasks simultaneously
- Building microservices with async communication

## When NOT To Use

- CPU-bound optimization - use python-performance instead
- Testing async code - use python-testing async module

## Modules

This skill uses progressive loading. Content is organized into focused modules:

- See `modules/basic-patterns.md` - Core async/await, gather(), and task management
- See `modules/concurrency-control.md` - Semaphores and locks for rate limiting
- See `modules/error-handling-timeouts.md` - Error handling, timeouts, and cancellation
- See `modules/advanced-patterns.md` - Context managers, iterators, producer-consumer
- See `modules/testing-async.md` - Testing with pytest-asyncio
- See `modules/real-world-applications.md` - Web scraping and database operations
- See `modules/pitfalls-best-practices.md` - Common mistakes and best practices

Load specific modules based on your needs, or reference all for detailed guidance.

## Exit Criteria

- Async patterns applied correctly
- No blocking operations in async code
- Proper error handling implemented
- Rate limiting configured where needed
- Tests pass with pytest-asyncio
## Troubleshooting

### Common Issues

**RuntimeError: no current event loop**
Use `asyncio.run()` as the entry point. Avoid `get_event_loop()` in Python 3.10+.

**Blocking call in async context**
Move sync I/O to `asyncio.to_thread()` or `loop.run_in_executor()`.

**Tests hang indefinitely**
Ensure pytest-asyncio is installed and test functions are decorated with `@pytest.mark.asyncio`.

---

**Source:** [`athola/claude-night-market`](https://github.com/athola/claude-night-market) → `plugins/parseltongue/skills/python-async/SKILL.md`

Files in this skill

  • SKILL.md2.6 KB
  • modules/advanced-patterns.md2.7 KB
  • modules/basic-patterns.md1.9 KB
  • modules/concurrency-control.md2.3 KB
  • modules/error-handling-timeouts.md2.1 KB
  • modules/pitfalls-best-practices.md2.2 KB
  • modules/real-world-applications.md1.9 KB
  • modules/testing-async.md1.7 KB

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.