There definitely isnโ€™t one standard (you can find some very long discussions about this state of affairs :sweat_smile: ). There are a lot of options, catering to different styles or sets of requirements. One resource I think is useful for something-like-a-standard is packaging.python.org. It focuseโ€ฆ Answer from jamestwebber on discuss.python.org
๐ŸŒ
The Hitchhiker's Guide to Python
docs.python-guide.org โ€บ writing โ€บ structure
Structuring Your Project โ€” The Hitchhiker's Guide to Python
Thanks to the way imports and modules are handled in Python, it is relatively easy to structure a Python project. Easy, here, means that you do not have many constraints and that the module importing model is easy to grasp.
๐ŸŒ
Python.org
discuss.python.org โ€บ python help
Python project structure - Python Help - Discussions on Python.org
October 13, 2023 - Hello, I am a programmer with experience in multiple of programming languages, but not yet in python. I want to start a bigger project, but while googling I find a lot of conflicting advice on how to structure it. Can someone provide me a few links to whatโ€™s the standard today, if there even is 1 standard?
Discussions

What is the best project structure for a Python application? - Stack Overflow
Any open source python projects you would recommend emulating their directory structure? 2009-10-05T17:02:31.19Z+00:00 ... Look at Django for a good example. More on stackoverflow.com
๐ŸŒ stackoverflow.com
What is the optimal structure for a Python project?
3 tips from me: When you use typing everywhere then you are forcing yourself to omit the circular dependencies (we cannot have circular dependencies imports in python) between modules which is the easiest way to keep a very basic structure. Think of the modules hierarchy while structuring the python code. Which module is high level (e.g. dashboard, GUI) and which is low level (e.g. some utils module build upon a standard library). Always import a module that has a lower level of abstraction (or in other words, lower complexity) in the module with higher complexity. E.g. GUI module imports storage access module and not the other way around. More on reddit.com
๐ŸŒ r/Python
52
253
December 25, 2023
Out of curiosity: what is the python project structure you usually go gor?
The usual result I get is the big ball of mud . More on reddit.com
๐ŸŒ r/Python
86
95
April 18, 2023
Whatโ€™s your approach to organizing Python projects for readability and scalability?
Read software engineering books. The more clean code, design patterns knowledge you have the better. One thing I do is to look at scikit learn source code. Itโ€™s very well coded you learn a lot from it. I simply mimic their file and architectural structure. More on reddit.com
๐ŸŒ r/Python
29
41
July 1, 2025
๐ŸŒ
Real Python
realpython.com โ€บ ref โ€บ best-practices โ€บ project-layout
project layout | Python Best Practices โ€“ Real Python
A reference guide to common Python application layouts and project structures for command-line applications, web applications, and more. ... Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials. ... Pick a question and Mentor AI takes it from here. ... By Leodanis Pozo Ramos โ€ข Updated Sept. 21, 2026 โ€ข Reviewed by Martin Breuss ... Get a Python Cheat Sheet (PDF...
๐ŸŒ
Medium
medium.com โ€บ @adityaghadge99 โ€บ python-project-structure-why-the-src-layout-beats-flat-folders-and-how-to-use-my-free-template-808844d16f35
Python Project Structure: Why the โ€˜srcโ€™ Layout Beats Flat Folders (and How to Use My Free Template) | by Aditya Ghadge | Medium
May 17, 2025 - This layout isnโ€™t magic, but itโ€™s been โ€œjust structured enoughโ€ for everything from tiny utilities to multi-service RAG pipelines. Copy it, tweak it, and youโ€™ll spend more time coding features โ€” less time chasing folders. A tidy tree is great, but without the right automation glue itโ€™s easy to slip back into chaos. Here are the four guard-rails baked into the template repo (check them out live in the workflow files and configs at Adityag009/python-project-template):
๐ŸŒ
Cosmicpython
cosmicpython.com โ€บ book โ€บ appendix_project_structure
Appendix B: A Template Project Structure
All the source code for our app, including the domain model, the Flask app, and infrastructure code, lives in a Python package inside src,[3] which we install using pip install -e and the setup.py file. This makes imports easy. Currently, the structure within this module is totally flat, but for a more complex project, youโ€™d expect to grow a folder hierarchy that includes domain_model/, infrastructure/, services/, and api/.
๐ŸŒ
Real Python
realpython.com โ€บ python-application-layouts
Python Project Structure: How to Choose the Right Layout โ€“ Real Python
2 hours ago - The patterns youโ€™ve seen so far come together in complete Python project structures. The examples below walk from a library to a CLI, through the major web frameworks, and on to a GUI app.
Find elsewhere
๐ŸŒ
Read the Docs
app.readthedocs.org โ€บ projects โ€บ python-project โ€บ downloads โ€บ pdf โ€บ latest pdf
Python Project Documentation Release 1.0 Tim Diels Jan 10, 2018
Python Project is a collection of Python project templates, checklists and documentation of their associated work๏ฌ‚ow. Currently, the collection contains just one project structure.
๐ŸŒ
Niftycode
niftycode.eu โ€บ download โ€บ Python-Project-Structure.pdf pdf
The structure of a Python project - niftycode
The main.py file contains the Python code. It serves as the entry point for this ... And there's another variation you might encounter in practice. In the following project ยท structure, the project name is used instead of src as the directory name:
๐ŸŒ
GitHub
github.com โ€บ yngvem โ€บ python-project-structure
GitHub - yngvem/python-project-structure: An outdated tutorial on how to manage a Python project ยท GitHub
In this part of the tutorial, I ... any Python project to ensure that you won't have to do major effort restructuring the code once you want to publish it. Let us start with the folder layout. Your project directory should be structured in the following way and we will explain why later. project_name โ”œโ”€โ”€ docs โ”‚ โ”œโ”€โ”€ make.bat โ”‚ โ”œโ”€โ”€ Makefile โ”‚ โ””โ”€โ”€ source โ”‚ โ”œโ”€โ”€ conf.py โ”‚ โ””โ”€โ”€ index.rst โ”œโ”€โ”€ examples โ”‚ โ””โ”€โ”€ ...
๐ŸŒ
GitHub
github.com โ€บ nedbat โ€บ pkgsample
GitHub - nedbat/pkgsample: A simple example of how to structure a Python project ยท GitHub
You should examine the files here, decide which are right for you, and adapt them to your needs. This directory is where you put your code. It should have one subdirectory named for your project, and all of your work goes into that subdirectory.
๐ŸŒ
GitHub
github.com โ€บ csymvoul โ€บ python-structure-template
GitHub - csymvoul/python-structure-template: A Python project to use as a template when developing a Python application ยท GitHub
A python project to use as a template ... project โ”œโ”€โ”€ README.md โ”œโ”€โ”€ example โ”‚ โ”œโ”€โ”€ __init__.py โ”‚ โ”œโ”€โ”€ package_1 โ”‚ โ”‚ โ”œโ”€โ”€ __init__.py โ”‚ โ”‚ โ”œโ”€โ”€ awesome_module.py โ”‚ โ”‚ โ”œโ”€โ”€ ...
๐ŸŒ
DEV Community
dev.to โ€บ codemouse92 โ€บ dead-simple-python-project-structure-and-imports-38c6
Python Package Structure: Dead Simple Python: Project Structure and Imports - DEV Community
April 27, 2022 - Executable projects should have a __main__.py in the top-level package. Then, you can directly execute that package with python -m myproject. Of course, there are a lot more advanced concepts and tricks we can employ in structuring a Python project, but we won't be discussing that here.
๐ŸŒ
Wpcomstaging
waterprogramming.wpcomstaging.com โ€บ 2023 โ€บ 01 โ€บ 18 โ€บ structuring-a-python-project-recommendations-and-a-template-example
Structuring a Python Project: Recommendations and a Template Example โ€“ Water Programming: A Collaborative Research Blog
January 18, 2023 - Here, I present a recommended structure for new Python projects, and discuss the main components. This is largely targeted at Python users who have not had a formal Python training, or who are working with their first significantly sized project. I provide an example_python_project, hosted on GitHub, as a demonstration and to serve as a template for beginners.
๐ŸŒ
GitHub
gist.github.com โ€บ ericmjl โ€บ 27e50331f24db3e8f957d1fe7bbbe510
How to organize your Python data science project ยท GitHub
I have a lesson learned from multiple months of working with other people that led me to this somewhat complicated, but hopefully ultimately useful directory structure. Under this folder called projectname/, we put in a lightweight Python package called projectname that has all things that are refactored out of notebooks to keep them clean. It has an __init__.py underneath it so that we can import functions and variables into our notebooks and scripts: ... In projectname/projectname/config.py, we place in special paths and variables that are used across the project. An example might be:
๐ŸŒ
Coderwall
coderwall.com โ€บ p โ€บ lt2kew โ€บ python-creating-your-project-structure
Python: Creating Your Project Structure (Example)
August 26, 2025 - The Example Application for this text can be found in github.com/mrako/python-example-project. ... In my experience the best folder structure for a Python project is to put your executables in a bin folder and your project into a your project ...
๐ŸŒ
Scribd
scribd.com โ€บ document โ€บ 955884562 โ€บ Python-Project
Python Project Documentation Guide | PDF
JavaScript is disabled in your browser ยท Please enable JavaScript to proceed ยท A required part of this site couldnโ€™t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
๐ŸŒ
Py-pkgs
py-pkgs.org โ€บ 04-package-structure.html
4. Package structure and distribution โ€” Python Packages
A special file named __init__.py is used to tell Python that a directory is a package (rather than just a plain-old directory on your computer). Weโ€™ll talk more about the __init__.py file and package structure in Section 4.2, but for now, hereโ€™s an example of a simple package structure with two modules and one subpackage: