Async Python Refactorer simplifies modernizing legacy Python codebases by refactoring synchronous methods into asynchronous coroutines. It scans your repository to locate specified functions, constructs a dependency and communication map, replaces blocking I/O calls (such as requests, boto3, and standard queues) with their modern async counterparts (aiohttp, aiobotocore, asyncio.Queue), and properly updates calling contexts. This skill is invaluable when migrating web backends, message consumers, or data processing pipelines to asynchronous architectures without breaking existing threading boundaries or changing function signatures.
主な機能
01Analyzes call graphs and converts functions in leaf-to-caller dependency order
02Identifies concurrent execution opportunities using asyncio.gather and TaskGroup
03Converts thread queues and shared data structures to non-blocking asyncio constructs
040 GitHub stars
05Detects and flags unsafe sync-only patterns like thread targets and callback interfaces
06Swaps blocking I/O packages (requests, pika, boto3, kafka-python) to async alternatives
ユースケース
01Refactoring worker threads and blocking message queues into high-throughput asyncio event loops
02Modernizing cloud API interactions with AWS or Kafka into async client implementations
03Migrating synchronous HTTP client operations in web services to non-blocking aiohttp workflows