name: python-async description: Async Python patterns via asyncio and aiohttp for I/O-bound concurrency version: 1.9.8 triggers: - python - async - asyncio - concurrency - await - coroutines - adding async APIs - handling concurrent I/O - or debugging async code metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/parseltongue", "emoji": "\ud83e\udd9e"}} source: claude-night-market source_plugin: parseltongue
Night Market Skill — ported from claude-night-market/parseltongue. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
asyncio and async/await patterns for Python applications.
import asyncio
async def main():
print("Hello")
await asyncio.sleep(1)
print("World")
asyncio.run(main())
This skill uses progressive loading. Content is organized into focused modules:
modules/basic-patterns.md - Core async/await, gather(), and task managementmodules/concurrency-control.md - Semaphores and locks for rate limitingmodules/error-handling-timeouts.md - Error handling, timeouts, and cancellationmodules/advanced-patterns.md - Context managers, iterators, producer-consumermodules/testing-async.md - Testing with pytest-asynciomodules/real-world-applications.md - Web scraping and database operationsmodules/pitfalls-best-practices.md - Common mistakes and best practicesLoad specific modules based on your needs, or reference all for detailed guidance.
小蔥技能站7w4.net發現了升級外掛。
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.
這是一個質量中上的 Python 非同步程式設計技能包。優點是內容組織清晰、模組劃分合理、程式碼示例實用,能有效幫助開發者理解和應用 asyncio 模式。不足之處在於內容深度有限,缺少現代 Python 特性的覆蓋,視覺化輔助材料較少。適合初學者入門學習,但對有經驗的開發者參考價值有限。