async-await-checker

Community

Master Python async/await, avoid event loop errors.

Authorricardoroche
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill enforces correct async/await patterns in Python, preventing common asyncio.run() errors within an already-running event loop and ensuring efficient non-blocking I/O. It helps developers write high-performance, concurrent applications without introducing subtle bugs.

Core Features & Use Cases

  • Core async/await Usage: Guides on using async def for functions that perform asynchronous operations and await for calling them.
  • Parallel Execution: Provides patterns for running multiple asynchronous tasks concurrently using asyncio.gather().
  • Async I/O Operations: Shows examples for asynchronous database queries, HTTP requests (with httpx), and file I/O (with aiofiles).
  • Error Handling & Testing: Covers robust error handling in async code and testing async functions with pytest.mark.asyncio.
  • Use Case: A FastAPI application needs to fetch data from multiple external APIs concurrently. This skill helps the developer use asyncio.gather() to make these HTTP requests in parallel, significantly reducing the total response time of the API endpoint.

Quick Start

Refactor the fetch_user_data function to be asynchronous and use await for database calls.

Dependency Matrix

Required Modules

httpxaiofilespytest

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: async-await-checker
Download link: https://github.com/ricardoroche/ricardos-claude-code/archive/main.zip#async-await-checker

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository