# Python Project Structure: How to Choose the Right Layout

DevFeed: [Python Project Structure: How to Choose the Right Layout](<https://devfeed.tech/articles/python-project-structure-how-to-choose-the-right-layout-87650.md>)

Original publisher: [Read original article](<https://realpython.com/python-application-layouts/>)

Author: Leodanis Pozo Ramos

Published: 2026-10-14T14:00:00Z

Content type: tutorial

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [project layout](<https://devfeed.tech/topics/project-layout.md>), [Python](<https://devfeed.tech/topics/python.md>), [import](<https://devfeed.tech/topics/import.md>)

Tags: [how-to](<https://devfeed.tech/tags/how-to.md>)

## AI overview

This tutorial explains how to choose between flat and src/ layouts for Python projects, balancing import convenience against packaging and testing concerns. It covers package organization, thin entry points, domain-named subpackages, and example structures for libraries, CLI tools, web applications, and GUI applications.

## Source excerpt

Learn how to structure Python projects: pick between flat and src/ layouts, organize your code, and apply the patterns to CLI, web, and GUI apps.