Use this flexible Python file structure to keep your code tidy
Python is one of the most used programming languages in the world. It works for data science, data analysis, web back end development and even front end development for dashboards. Kick starting a Python project requires setting up a directory structure to hold Python scripts and other files, configure logging and testing, install basic dependencies, setup a requirements file and a .gitignore file. It is cumbersome and time consuming for short.
For this reason I am going to share a minimum Python project so you can start working in a new project as fast as possible and spending less time setting up the project. The project is modular as well, so it can hold sub-projects with its own files and storage space.
TL/DR. Clone the repository, install the dependencies, setup the logging directory and start coding. You can find the code here. Install it after creating a virtual environment by running this command in the root directory.
pip install -r requirements.txt
Project features
The project is bare-bones, however it is packed with some useful features listed below.
- A modules directory where sub-projects or project modules can be placed to keep the file structure ordered and tidy. Each module directory has…