Back to feed

How to Structure Python Projects

Real Python

EDITOR BRIEF

This article explains how to organize Python projects and choose between a flat layout and a src/ layout. It also shows how to apply these patterns to different kinds of apps, including CLI, web, and GUI projects.

INSIGHTS

Project structure affects how easy code is to test, grow, and maintain. If you're building a Python app, try comparing flat and src/ layouts on a small sample project first.

CodeFriends courses that build on this story. Practice in the browser with nothing to install.

COMMENTS

0/40
0/2000

Loading comments…