Add LICENSE, update .gitignore, more messing around

This commit is contained in:
2025-08-26 16:03:53 -04:00
parent 24c0934b8b
commit 5b9b0a0018
4 changed files with 683 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
import asyncio
import mealie_client
from mealie_client import MealieClient
from usda_fdc_python import FdcClient
from usda_fdc_python.usda_fdc.analysis.recipe import (
create_recipe,
analyze_recipe)
@@ -18,13 +19,15 @@ async def main():
fdc_api_key = os.getenv("FDC_API_KEY")
async with mealie_client.MealieClient(
async with MealieClient(
base_url = mealie_url,
api_token = mealie_api_key
) as m_client:
recipe_id = "e733fc62-2dce-4fa0-98ba-f46ef75699ba" # fudgey brownies
# recipe_id = "bcbbf532-185f-41f4-876d-beaf7ff0fb32" # Greek orzo
recipe_name = "{Fudgey Brownies Test}"
recipe = await m_client.recipes.get(recipe_id)
if recipe:
fdc_client = FdcClient(fdc_api_key)
@@ -37,7 +40,7 @@ async def main():
# print(f"Len: {len(recipeIngredients)}")
newRecipe = create_recipe(
name="Fudgey Brownies Test",
name=recipe_name,
ingredient_texts = recipeIngredients,
client = fdc_client,
servings=9