← ClaudeAtlas

python-packaginglisted

Use when the question is the mechanics around a module rather than what it is called — `__init__.py`, `__all__`, a re-export, one file or two modules, relative versus absolute imports, a circular import, or whether this needs a class at all. Owns when a class earns its place and the one-class-per-module cap with the test for when a closed set of declarations may share a module, the four-part re-export contract, building nothing at import time, and the `py.typed` marker a library distribution ships. Naming a module is `naming`. - Adding a public module to a package; a wildcard import; import order; a module-level settings object, engine or client.
wntic/pyhouse · ★ 3 · Code & Development · score 76
Install: claude install-skill wntic/pyhouse
# Python Packaging How a module is packaged, and how another module reaches it. These rules are **architecture-neutral** — they hold in a layered app, a standalone service, and a shared library alike, because they are about Python's import system rather than about layers. What they do *not* decide is which package a module belongs in. That is the architecture's job: `hex-architecture` (in the `pyhouse-hex` plugin) for a layered app, `flat-layered` (in `pyhouse-flat`) for a package-by-technology service, or the project's own layout where neither applies. ## When to use vs. neighbours - Choosing a name for anything — a package, module, class, function or variable → `naming`, first. "Name this module" lands there, not here; this skill only checks the filename against the class once the name exists. - Creating a module or an `__init__.py`, or changing a package's public surface → this skill. - Any question of relative vs absolute, or how to spell an import → this skill. - A circular import, or an import pushed into a function body to break one → this skill; the cycle is a structural problem and rule 11 says so. - Which package a module belongs in → `hex-architecture` (in the `pyhouse-hex` plugin) or `flat-layered` (in `pyhouse-flat`). - Annotation forms, comments → `python-style`; logging → `python-logging`. - The exception catalog's contents and where its file sits → `exception-catalog`; that it may hold many classes is this skill's set test, of which it is the fir