Folder and file organization for Python development

George Silva picture George Silva · Oct 29, 2009 · Viewed 12.4k times · Source

What is the best way to organize code that belongs to the same project in a Python development environment? What are the do and donts of Python project organization? Do you separate each class in a file?

Project A
   Classes
       "subsystem1"
           class1
           class2
           subsystem1Module
       "subsystem2"
       "utils"
       "etc"
   Tests
   Whatever
   etc?

Any suggestions? Oh, and please describe what are the (possible) problems of each type of organization.

What are considered best practices for organizing Python code?