From dee4cd7f37ec1a820b6f3e8d761f2ce206234272 Mon Sep 17 00:00:00 2001 From: Richard Perez Jr Date: Thu, 27 Jun 2024 17:51:43 +0000 Subject: [PATCH] Reorganized structure of program --- api_integration/__init__.py | 2 ++ .../edamam_integration.py | 0 .../openai_integration.py | 0 main.py | 8 +++++--- 4 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 api_integration/__init__.py rename edamam_integration.py => api_integration/edamam_integration.py (100%) rename openai_integration.py => api_integration/openai_integration.py (100%) diff --git a/api_integration/__init__.py b/api_integration/__init__.py new file mode 100644 index 0000000..6d0ea56 --- /dev/null +++ b/api_integration/__init__.py @@ -0,0 +1,2 @@ +from api_integration.edamam_integration import get_recipe +from api_integration.openai_integration import alt_recipe_query \ No newline at end of file diff --git a/edamam_integration.py b/api_integration/edamam_integration.py similarity index 100% rename from edamam_integration.py rename to api_integration/edamam_integration.py diff --git a/openai_integration.py b/api_integration/openai_integration.py similarity index 100% rename from openai_integration.py rename to api_integration/openai_integration.py diff --git a/main.py b/main.py index 71efdd5..2adf4d0 100644 --- a/main.py +++ b/main.py @@ -2,8 +2,8 @@ import os from dotenv import load_dotenv -from edamam_integration import get_recipe -from openai_integration import alt_recipe_query +from api_integration.edamam_integration import get_recipe +from api_integration.openai_integration import alt_recipe_query # Importing env variables for API authentication load_dotenv() @@ -41,11 +41,13 @@ def make_recipe(): " dish you would like to make: ") recipe_query = get_recipe(EDAMAM_APP_ID, EDAMAM_APP_KEY, requested_recipe) - print(f"\n{alt_recipe_query(OPENAI_KEY, diet, recipe_query)}\n") + new_recipe = f"\n{alt_recipe_query(OPENAI_KEY, diet, recipe_query)}\n" + print(new_recipe) def lookup_prev_recipe(): return True + if __name__ == "__main__": main()