Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
athola avatar

Python Async

  • 97 installs
  • 325 repo stars
  • Updated August 2, 2026
  • athola/claude-night-market

Apply vetted async context managers, iterators, and producer-consumer queue patterns when implementing Python backend concurrency.

About

Python Async (Advanced Async Patterns) is an agent skill from athola/claude-night-market that teaches intermediate-to-advanced asyncio idioms solo builders need when backend work stops being synchronous: async context managers for resources like database connections, async iterators for page-by-page fetching, and producer-consumer queues for backpressure-friendly pipelines. It assumes familiarity with foundational async patterns and timeout handling from sibling skills in the same collection, and packages each pattern as concise, runnable Python so you can transplant structure into FastAPI workers, scrapers, or job runners. Install it during Build when you are wiring real I/O concurrency and want guard-railed examples instead of trial-and-error around __aenter__, AsyncIterator typing, and queue coordination. It is reference material, not a deployable service—its value is fewer subtle asyncio leaks in indie APIs and agents.

  • Async context manager pattern with __aenter__ and __aexit__ for connection lifecycle
  • Async iterators and async for over paginated or streamed data sources
  • Producer-consumer workflows using asyncio queues
  • Builds on basic-patterns and error-handling-timeouts dependencies in the night-market skill chain
  • Copy-paste reference implementations with simulated I/O for learning and adaptation

Python Async by the numbers

  • 97 all-time installs (skills.sh)
  • Ranked #108 of 290 Python skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/athola/claude-night-market --skill python-async

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs97
repo stars325
Security audit3 / 3 scanners passed
Last updatedAugust 2, 2026
Repositoryathola/claude-night-market

What it does

Apply vetted async context managers, iterators, and producer-consumer queue patterns when implementing Python backend concurrency.

Files

SKILL.mdMarkdownGitHub ↗

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.

Related skills

FAQ

Is Python Async safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Pythonbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.