python-patterns skillA
python-patterns is agent-read markdown (skill) from komluk/scaffolding: Python backend patterns: layered architecture, async I/O, dependency injection, repository/service separation. TRIGGER when: creating routes, models, schemas, or services in a Python backend. SKIP: REST contract design (use api-design); schema/index tuning (use database-optimization). (Examples: FastAPI + SQLAlchemy + Pydantic.).
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.
What the file says
# Python Backend Patterns Skill ## Purpose Best practices for Python backend development: layered architecture, async I/O, dependency injection, and clear separation between HTTP handling, business logic, and data access. The concrete examples below use FastAPI, SQLAlchemy, and Pydantic, but the patterns apply to any Python web framework, ORM, and validation library. ## Auto-Invoke Triggers - Creating backend routes / endpoints - Working with ORM models - Implementing async operations - Creating request/response validation schemas --- ## Layer Responsibilities | Layer | Responsibility | |-------|----------------| | **Endpoints** | HTTP handling, request/response | | **Services** | Business logic, orchestration | | **Repositories** | Data access, queries | | **Models** | Database schema | | **Schemas** | Data validation, serialization | These layers are framework-agnostic — keep HTTP concerns, business rules, and data access in separate modules regardless of which framework/ORM you use. --- ## Example: FastAPI + SQLAlchemy + Pydantic (illustrative) > Illustrative — this is one concrete stack shown as an example. Substitute your …
Read the whole file at its exact version.
How to install
mdr add komluk/scaffolding/python-patterns@git:20260705.958c030mdr add komluk/scaffolding/python-patterns@sha256:0c7dbe8e3f8299f2Pin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.
[](https://markdownregistry.com/a/art_pgpvbvosqhkzy2m6)
1 badge views in 30 days
Versions
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260705.958c030 latest | 2026-07-05 | 958c030 | 5,911 B | A | view · diff |
| git:20260614.9d809af | 2026-06-14 | 9d809af | 5,944 B | A | view · diff |
| git:20260520.3aa374b | 2026-05-20 | 3aa374b | 5,088 B | A | view · diff |
| git:20260409.25dc3ca | 2026-04-09 | 25dc3ca | 4,987 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (5911 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
komluk/scaffolding · 15 stars · license MIT · pushed 2026-09-21 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_pgpvbvosqhkzy2m6 GET https://markdownregistry.com/api/v1/resolve?ref=komluk/scaffolding/python-patterns GET https://markdownregistry.com/api/v1/blob/0c7dbe8e3f8299f28f7e0aa3e13a488c40a4019449555f0484c8713364007e5e
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
More from komluk/scaffolding
Every file in komluk/scaffolding