Spartan is a Python application that generates nutritionally complete diets given a selection of foods.
- Generate diets optimized by nutritional density, minimizing total weight.
- Enter price data to generate diets which minimize total cost.
- Provides a nutrient composition database with over 7000 foods that can be easily inspected and compared.
- Personal nutritional requirements based on US Food and Nutrition Board recommendations.
- Choose dietary preferences to exclude certain food groups.
- Customize food constraints to limit quantity of specific foods in generated diets.
- Examine nutritional breakdown of generated diet on a food by food basis.
A prebuilt Windows executable can be found under releases. Tested on Windows 10, but may work on earlier versions.
- Python 3.6
- virtualenv
On Windows
git clone https://github.com/josh-minch/spartan.git
cd spartan/spartan
virtualenv --no-site-packages virtual
virtual\Scripts\activate
pip install -r requirements.txt
python main.py
On macOS / Linux
git clone https://github.com/josh-minch/spartan.git
cd spartan/spartan
virtualenv --no-site-packages virtual
source virtual/bin/activate
pip install -r requirements.txt
python main.py
- Python 3.6
- Qt for Python's PySide2 - GUI toolkit
- PuLP - Linear programming modeller
- CBC - Linear programming solver
- Numpy
- USDA's FoodData Central SR Legacy - Food nutrient composition data
- QtComboBoxTableWidget - Very helpful reference for specific Qt functionality
- PyInstaller - For the Windows executable
- Feather Icons
- Logo provided by a lovely artist.
This software does not currently have a license.
This project includes open source software licensed under the MIT License and the BSD License. In compliance with these licenses, all copies and substantial portions of the licensed software retains the original copyright and license notices.