2

I have created a project in python and i want to put all the files in a standard format inside a folder ie I want to know the standard project structure of python.

My project contains following files:

(1) main.py 
(2) source_code1.py
(3) source_code2.py
(4) setup.py
(5) phpfile1.php
(6) phpfile2.php
(7) image1.png
(8) image2.png
(9) README.txt
(10) CHANGES.txt
(11) LICENSE.txt
(12) test1.py
(13) test2.py

Can anyone tell me, which file to put in which folder ?

NOTE: I have read almost all the related questions of project structure in python but not found where to put image files and other code files ends with different extension like .php , .html etc

Is there any standard way of project structuring in python ?

1 Answer 1

1
  • Make a new folder with your project name.

  • Put setup.py , README.xt LICENSE.txt and CHANGES.txt there

  • Inside it make a folder with the name of the app, keep main.py source-code1.py, source_code2.py in it.

  • Another Images folder - Put image1.png and image2.png there
  • Another folder Test for the test1.py and test2.py
  • Another folder scripts and keep .php files there

Hope it helps

Sign up to request clarification or add additional context in comments.

3 Comments

Is there any standard way for this? @user8477766
This is the standard way only.
any reference ? @user8477766

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.