scaffml is a professional ML project structure generator that allows data scientists and ML engineers to quickly scaffold production-ready machine learning projects.
It provides:
- Clean, modular project architecture
- Optional Docker support
- Templated code files for rapid development
- Preconfigured
.gitignoreand folder structure - Easy integration with CI/CD, testing, and ML workflows
- ✅ Generate ML projects with a single CLI command
- ✅ Optional Docker support via
--dockerflag - ✅ Predefined folder hierarchy:
app/,src/,data/,notebooks/,tests/ - ✅ Jinja2 templated files for customizable project boilerplate
- ✅ Safe collision detection to avoid overwriting existing projects
- ✅ Professional CLI with version info and help menus
Create directory:
mkdir your_root_project_name
cd your_root_project_nameActivate vertual Env(Recommended):
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activateInstall via pip:
pip install scaffmlOr clone and install locally:
git clone https://github.com/epythonlab2/scaffml.git
cd scaffml
pip install .scaffml versionscaffml create my_ml_projectscaffml create my_ml_project --docker- This generates a professional folder structure with templated files.
- Empty directories are preserved with
.gitkeep.
Example project layout:
my_ml_project/
├── app/
│ ├── api/
│ │ ├── __init__.py
│ │ ├── routes/
│ │ │ └── prediction.py
│ │ ├── main.py
│ │ └── schemas.py
│ ├── pipelines/
│ ├── services/
│ └── core/
│ ├── __init__.py
│ ├── config.py
│ └── logger.py
├── data/
│ ├── raw/
│ ├── processed/
│ └── external/
├── notebooks/
├── models/
├── src/
│ ├── __init__.py
│ ├── data/
│ │ ├── __init__.py
│ │ ├── loader.py
│ │ └── preprocessing.py
│ ├── features/
│ │ ├── __init__.py
│ │ └── build_features.py
│ ├── models/
│ │ ├── __init__.py
│ │ ├── train.py
│ │ └── predict.py
│ └── utils/
│ └── __init__.py
├── tests/
│ ├── __init__.py
│ ├── test_api.py
│ └── test_data.py
├── .github/
│ └── workflows/
│ └── ci.yml
├── __init__.py
├── .gitignore
├── Dockerfile
├── requirements.txt
├── README.md
└── pyproject.toml
We welcome contributions!
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -m "Add feature") - Push and submit a pull request
MIT License – see LICENSE for details.
- Designed for ML engineers who want clean, production-ready projects quickly.
- Easily extendable for additional templates and features.
- Works cross-platform (Linux/macOS/Windows) with Python 3.10+.