Loading...
Loading...
Production Python engineering patterns covering architecture, observability, testing, performance/concurrency, and core practices. Use when designing Python systems, implementing async/sync APIs, setting up monitoring, structuring tests, optimizing performance, or following Python best practices.
npx skill4agent add yariv1025/skills python-engineeringreferences/| Need | Read |
|---|---|
| Package layout, DI, config, plugins | references/architecture.md |
| Logging, metrics, tracing, health | references/observability.md |
| Test structure, fixtures, CI | references/testing.md |
| Async safety, concurrency, throughput | references/performance-concurrency.md |
| GIL, packaging, I/O, reliability | references/core-practices.md |
| Task | Approach |
|---|---|
| Inject dependencies | Use typed getters or framework DI; see references/architecture.md. |
| Structured logging | Log with extra dict and correlation ID; see references/observability.md. |
| Reuse HTTP client | One long-lived client per app; timeouts on every call. See references/performance-concurrency.md. |
| Resource cleanup | Use context managers; avoid blocking in async. See references/core-practices.md. |
| Isolate tests | Fixtures, parametrize, no hidden network/time. See references/testing.md. |
with open(path) as f:
process(f.read())
# or async: async with client: ...logger.info("request_handled", extra={"request_id": req_id, "path": path})
# Config: Settings from Pydantic BaseSettings or env, validated at startup.