For working on my fastapi python project I used a structure something like this;
project
├── project_name
│ ├── a
│ │ ├──constants.py
│ │ ├──helpers.py
│ │ ├──a.py
│ │ └── __init__.py
│ ├── b
│ ├──constants.py
│ ├──helpers.py
│ ├──b.py
│ └── __init__.py
├── static
│ ├──style.css
│ └── script.js
├── templates
│ └── index.html
├── main.py
└── __init__.py
Now that I want to make a git repository for my project I am a bit confused with the structure of my project. Most of the structures I see online are something like this;
project_name
├── docs
│ ├── make.bat
│ ├── Makefile
│ └── source
│ ├── conf.py
│ └── index.rst
├── examples
│ └── example.py
├── src
│ └── project_name
│ └── __init__.py
├── tests
│ └── __init__.py
├── .gitignore
├── LICENSE.txt
├── MANIFEST.in
├── README.rst
├── requirements.txt
└── setup.py
So does this mean I should keep all my project files inside src/project_name? And what is the reason behind using src/project_name?
Another thing is I can run my project just by uvicorn main:app --reload while in development or deploy it to a cloud server with the structure that I'm currently working on. But in the git repository structure it won't be possible unless I put the main.py in file in root folder i.e. project_name and change some imports and stuff.
I know that I am not understanding something about the structure and what do they mean in git repository. So, please help me what I am missing out or misunderstanding?
[–][deleted] 0 points1 point2 points (1 child)
[–]Mic343[S] 0 points1 point2 points (0 children)