Skip to content
Development
Skill

/python-async

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.

From plugin
claude-night-market
343200 skills60 agents162 commands1 MCP

Claude Code

$ npx -y skills add athola/claude-night-market --skill python-async --agent claude-code

SKILL.md

python-async.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.
globs: "**/*.py"
alwaysApply: false
category: async
tags:
- python
- async
- asyncio
- concurrency
- await
- coroutines
tools: []
usage_patterns:
- async-api-development
- concurrent-io
- websocket-servers
- background-tasks
complexity: intermediate
estimated_tokens: 400
progressive_loading: true
modules:
- modules/basic-patterns.md
- modules/concurrency-control.md
- modules/error-handling-timeouts.md
- modules/advanced-patterns.md
- modules/testing-async.md
- modules/real-world-applications.md
- modules/pitfalls-best-practices.md

Async Python Patterns

asyncio and async/await patterns for Python applications.

Quick Start

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`.

Read more
@athola
Ships withclaude-night-market

A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.

343200 skills60 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
343
Star history of athola/claude-night-market on GitHub, a chart by star-history.com

Other skills on claude-night-market.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about python-async.

Which coding agents can use python-async?
python-async installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.