Preparing project structure for python3 project

Viewed 16

I'm working on some initial, default, starting python project structure, what would be nice to use to start any python3 project.

Below is what do I have right now:

project
├── .devcontainer
    ├── devcontainer.json
    ├── Dockerfile
    ├── start.sh
├── docs
├── libs
    ├── logging
    ├── lib_1
        ├── src
            ├── file_1.py
            └── file_2.py
        ├── pyproject.toml
        ├── setup.cfg
        └── setup.py
    └── lib_2
        ├── src
        ├── pyproject.toml
        ├── setup.cfg
        └── setup.py
├── logs
├── services
    ├── service_1
        ├── main.py
    └── service_2
├── tests
├── tools
├── .gitignore
├── .gitlab-ci.yaml
├── docker-compose.yml
├── LICENSE
├── pyproject.toml
├── README.md
├── requirements.txt
└── setup_environment.py

I have configured some .setup.cfg, pyproject.toml and added some python files to test if all imports are working ok. I have added some Dockerfile, and docker-compose.yml, getting some image, installing my dependencies. The container is running in vscode. And it's working.

I just have a question about the best practices. Lets assume that's a starter for any big python project.

  1. Is it a good idea to prepare projects like above? Please give me any info if it's looking bad or if should I change anything (even like names :D - but yeah service_1, lib_1 it's just an example ^^)
  2. What do you thing about poety? Is it recommended to use it for python projects?
  3. What do you thing about pre-commit and pre-push? Is it recommended to use it?
  4. Is there any missing thing? Something what is important or just recommended?

Thank you!

0 Answers
Related