Skip to content

meaghansharrard89/python-p3-v2-final-project-template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌟Introducing: The Cookbook Chronicles - Your Epic Culinary Odyssey!🌟

Ahoy there, Culinary Captains! Embark on a journey like never before with The Cookbook Chronicles. This isn't just a recipe organizer; it's your passport to a world of flavors!

Here's why The Cookbook Chronicles is the ultimate companion for your kitchen adventures:

🍽️ Unleash Your Culinary Creativity:

Create new recipes with instructions, ingredients, and the recipe's category.

🔥 Ingredient Extravaganza:

Don't have all the ingredients needed on hand? Fear not! Keep track of all ingredients you need to buy with the separate Ingredients table.

✨ Power Over Delete and Update:

Exercise your chef's prerogative to delete recipes, update ingredients and categories, and more with the swipe of a digital spatula.

Let The Cookbook Chronicles be your culinary compass, and happy cooking!

Project Details

Program Information

└── lib
    ├── models
        ├── __init__.py
        ├── category.py
        └── ingredient.py
        ├── recipe.py
        ├── recipe_ingredient.py
    ├── cli.py
    ├── debug.py
    ├── helpers.py
├── Pipfile
├── Pipfile.lock
├── README.md

category.py

Category contains an ID and name column (breakfast, lunch, etc.), which is connected to a recipe through the category_id column in recipes.py. Each recipe can have only one category, but a category can be associated with many recipes.

ingredient.py

Ingredient contains an ID and name column (salt, butter, etc.), which is connected to a recipe through a joint table in recipe_ingredients.py in the ingredient_id column. Many recipes can be associated with many ingredients, and vice versa.

recipes.py

Recipe contains four columns: ID, title, instructions, and category_id. A recipe can only have one category but can have multiple ingredients.

recipe_ingredients.py

RecipeIngredient contains three columns: ID, recipe_id, and ingredient_id. All new recipes created will have the ingredient's ID stored in this table along with the associated recipe ID, while the name of the ingredient will be stored in the ingredients table.

cli.py

Imports functions from helper.py and organizes them in a way that matches what the user sees in their terminal.

helpers.py

These functions allow the user to interact with the database with the help of functions imported from category.py, recipe.py, ingredient.py, and recipe_ingredient.py.

Getting Started:

To start this program, please follow the instructions below:

  1. Navigate to the folder that holds all program files.
  2. Type “pipenv install” and press enter to install necessary dependencies.
  3. Type “pipenv shell” and press enter to start the virtual environment.
  4. Run "python lib/cli.py" to start the program.

Using this Program

Explore the program through these different menu options:

  • 0- Kitchen's closed: closes the menu and brings users back to the program files.
  • 1- Create a new recipe: enter the title, ingredients, instructions, and category to create a new recipe. The new recipe will add ingredients to the ingredients/recipe_ingredients tables (if they don't already exist).
  • 2- Display all recipes: displays all recipes and associated information.
  • 3- Find a recipe by ID: returns the recipe details after searching by recipe ID.
  • 4- Update an existing recipe: update a recipe's title, instructions, ingredients, or category. Any changes made to ingredients will reflect in the recipe_ingredients/ingredients table.
  • 5- Delete a recipe: enter the title of the recipe to delete. This will delete the instance from recipe, ingredients, and the recipe_ingredient tables.
  • 6- Add a new ingredient: add a new ingredient by entering the name of the ingredient.
  • 7- Display all ingredients: displays all ingredients.
  • 8- Find an ingredient by ID: returns the ingredient name after searching by ingredient ID.
  • 9- Update an existing ingredient: update an ingredient's name.
  • 10- Find ingredient(s) by recipe ID: returns all ingredients associated with a specific recipe ID.
  • 11- Delete an ingredient: enter the name of the ingredient to delete.
  • 12- Add a new category: add a new category by entering the name of the category.
  • 13- Display all categories: displays all categories.
  • 14- Find a category by ID: returns the category name after searching by category ID.
  • 15- Update an existing category: update a category's name.
  • 16- Delete a category: enter the name of the category to delete.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 100.0%