The Python with SQLite3 database CLI Bodyweight Fitness is a command-line interface application designed to assist users in generating workout routines quickly and easily, based on their available time and muscle groups they want to exercise. It provides features such as generating workout plans, randomizing exercises for variety, storing workouts for later reference, and more.
- This application is a Command Line Interface (CLI) program, allowing users to interact via the command line. It provides clear instructions and prompts for user-friendly interactions across a variety of potential user activities.
- The application implements model classes, including User, Exercise, and Workout, to represent entities within the fitness application. These classes are mapped to a database table.
- A one-to-many relationship exists between User and Workout, where a user can have multiple workouts. This relationship is well-defined and implemented in the ORM.
- Property methods are included in the classes to enforce data integrity and constraints. For example, input validation for usernames, workout types, durations, etc., is handled.
- Each model class provides methods for creating, reading, updating, and deleting records. These operations are directly linked to the database.
- The CLI offers interactive menus for users to perform actions such as creating workouts, viewing past workouts, and more. The application loops appropriately until the user decides to exit.
- The CLI gracefully handles invalid inputs and provides informative error messages to enhance usability and robustness.
- The project follows Object-Oriented Programming (OOP) principles, including encapsulation, inheritance, and abstraction. The code is well-organized into modules and classes for readability and maintainability.
- The project maintains a clean and well-organized structure, including a README.md file with detailed instructions on how to set up and use the application.
- Opening the App and User Greeting
- Workout Type Selection
- Workout Duration Selection
- Generating a Workout Plan
- Randomization for Variety
- Displaying the Workout Plan
- Option to Re-generate Workout Plan
The project is organized as follows:
python-cli-fitness-coach/
│ lib
│ data
│ exercise_database.py
│ seed.py
│ workout_plans.db
│ models
│ __init__
│ exercise.py
│ user.py
│ workout.py
│ cli.py
│ debug.py
│ helpers.py
│ .gitignore
│ main.py
│ Pipfile
│ Pipfile.lock
│ README.md
The project relies on the following Python libraries, which are specified in the Pipfile:
ipdb
pytest
click
tabulate
rich
You can install these dependencies using Pipenv (name) or Pipenv install.