This comprehensive guide is dedicated to mastering the structure of Python projects. It's an in-depth resource for Python developers of all levels, focusing on establishing a solid foundation for creating well-organized, maintainable, and efficient Python codebases.
...
...
...
...
tutorial_ml/
├── README.md # Provides a comprehensive introduction and user guide for the package.
├── src/ # The main source directory for the package.
│ ├── tutorial/ # The core package containing all the primary modules and sub-packages.
│ │ ├── schemas/ # Contains data models and schemas, defining the data structure.
│ │ │ ├── ad_unit.py # Defines the AdUnit model used for representing ad data.
│ │ │ └── __init__.py # Signifies that 'schemas' is a Python sub-package.
│ │ ├── wrangler/ # Sub-package with modules for data collection, cleaning, and analysis.
│ │ │ ├── analyser.py # Module for analyzing the ad data (e.g., statistical analysis, ML models).
│ │ │ ├── cleaner.py # Module for cleaning and preprocessing ad data.
│ │ │ ├── collector.py # Module for collecting or simulating ad performance data.
│ │ │ └── __init__.py # Marks 'wrangler' as a Python sub-package.
│ │ └── __init__.py # Marks 'tutorial' as a Python package.
│ └── __init__.py # Signifies that 'src' directory is a Python package.
├── tests/ # Contains unit tests for the package, ensuring code reliability and correctness.
├── docs/ # Documentation for the package, including usage examples, API documentation, etc.
├── pyproject.toml # Modern configuration file for specifying build system and dependencies.
└── setup.cfg # Configuration file for setuptools, used to define package metadata and behavior.
Python 3.6+
Docker
requirements.txt