Python Code Organization — Junior¶
Organize a project so a reader can find the entry point, feature code, and tests quickly.
- Group related behavior in a module.
- Keep tests next to the feature in the test tree.
- Avoid
utils.pyas a dumping ground. - Keep executable startup code in
main.pyor a CLI module.
Move code only when its responsibility becomes clearer, not merely because a file grows.