Python library to retrieve information from chefkoch.de
Project description
python_chefkoch
Python library to retrieve data from chefkoch.de
Installation
Use the package manager pip to install python_chefkoch
pip install python_chefkoch
Examples:
Retrieving daily recommendations
from python_chefkoch import chefkoch
recipes = chefkoch.get_daily_recommendations(category="backe")
for recipe in recipes:
print("\n" + str(recipe))
Retrieving a random recipe
from python_chefkoch import chefkoch
recipe = chefkoch.get_random_recipe()
print(recipe.modify_portions(portions=6))
for step in recipe.steps:
print("Next -> " + step)
Searching for a specific recipe with filter
from python_chefkoch import chefkoch
print(chefkoch.get_specifications())
recipes = chefkoch.search(search_term="Lasagne",
filters={"page": 2, "sort": "rating", "duration": 30,
"difficulty": {"easy": True, "medium": True, "hard": False}},
specifications=["vegetarisch", "gemuese"])
print(recipes)
Recipe interactions
name | type | description |
---|---|---|
get_next_step | method | returns the next step of the recipe. Throws EndOfRecipeError when the end is reached |
modify_portions | method | modifies the portions and returns the new dict for ingredients |
info_dict | attribute | contains all information retrived directly from javascript from the chefkoch page |
ingredients | attribute | dictionary with ingredients as key and the amount as values. Everything is a string |
steps | attribute | list with all steps. Simply the instruction text split by '.' |
image | attribute | hyper-link to the main image |
... | attributes | more attributes available that are self-explainatory |
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Participants
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for python_chefkoch-2.0.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67ff1d677b22ee6a15d1548fcff4c038f28fc46a853c2a3487ea5923def067ac |
|
MD5 | 46c1b3b74c9372078d1111d41898a2be |
|
BLAKE2b-256 | 3b9e92dc498f7744466d8189b2c42c29df99ff55925a1dc571c639ca500747d5 |