py-async-patterns
CommunityMaster async patterns for reliable Python apps.
AuthorCJHarmath
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Async Python can be error-prone with race conditions, session leaks, and improper transaction handling in FastAPI + SQLAlchemy.
Core Features & Use Cases
- Per-request AsyncSession lifecycle management to prevent leaks.
- Concurrent vs sequential queries with asyncio.gather and proper await patterns.
- Transaction boundaries, begin/commit/rollback, and refresh for generated values.
- Deadlock avoidance via consistent locking orders and safe query patterns.
- Debugging, logging, and post-condition validation patterns for robust code.
Quick Start
Install FastAPI and SQLAlchemy, wire a per-request session (get_session example) into a sample endpoint, and run a minimal app to see the patterns in action.
Dependency Matrix
Required Modules
None requiredComponents
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: py-async-patterns Download link: https://github.com/CJHarmath/claude-agents-skills/archive/main.zip#py-async-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.