Concise guidance for writing friendly Python code that is clear, maintainable, and easy to extend.
.py.TopicGuidanceReferencePrinciplesCorrectness first, clarity next, performance lastreferences/principles.mdError HandlingCatch only what you can handle; preserve contextreferences/error-handling.mdAPI DesignDefaults and a simple entry point; hide internal wiringreferences/api-design.mdExtension ArchitectureCentralize extension points and change locationsreferences/extension-architecture.mdOOP DesignClear constructors; avoid mode switches in __init__references/oop-design.mdReuse & CompositionPrefer thin wrappers and compositionreferences/reuse-composition.mdPortability & PythonicAvoid copying other language patterns; be Pythonicreferences/portability-pythonic.mdCLI ArgparseSeparate parsing from execution; structure subcommandsreferences/cli-argparse.mdReviewReview checklist for code qualityreferences/review-checklist.md
urls.