Skip to main content

python-chefkoch

Downloads PyPI version

A simple Python retrieval tool for recipes from chefkoch.de


🐍 Installation

pip install python-chefkoch

Requirements:


🚀 Quickstart

from chefkoch.recipe import Recipe

recipe = Recipe('https://www.chefkoch.de/rezepte/745721177147257/Lasagne.html')
print(recipe.title)

🍽️ Recipe Attributes

Attribute Type Description
title str The title of the recipe.
image_url str The URL of the recipe's main image.
image_base64 bytes The raw bytes of the recipe's image.
image_urls List[str] URLs of all images associated with the recipe.
date_published datetime.datetime The date when the recipe was published.
prep_time isodate.Duration The preparation time of the recipe.
cook_time isodate.Duration The cooking time of the recipe.
total_time isodate.Duration The total time required to prepare the recipe.
difficulty str The difficulty level of the recipe.
ingredients List[str] The list of ingredients required.
instructions List[str] The list of instructions to prepare the recipe.
publisher str The name of the publisher of the recipe.
author str The name of the author of the recipe.
calories str The number of calories in the recipe.
keywords str The keywords associated with the recipe.
number_reviews int The number of reviews for the recipe.
number_ratings int The number of ratings for the recipe.
rating float The average rating of the recipe.
category str The category of the recipe.

🕵️ Retrievers

RandomRetriever

Retrieve one or more random recipes from chefkoch.de.

from chefkoch.retrievers import RandomRetriever

retriever = RandomRetriever()
recipes = retriever.get_recipes(n=3)  # Get 3 random recipes
retriever.close()  # Always close when done

DailyRecipeRetriever

Retrieve daily recommended recipes ("kochen" or "backen").

from chefkoch.retrievers import DailyRecipeRetriever

retriever = DailyRecipeRetriever()
recipes = retriever.get_recipes(type="kochen")  # or type="backen"
retriever.close()

SearchRetriever

Search for recipes with advanced filters.

from chefkoch.retrievers import SearchRetriever

retriever = SearchRetriever(
    properties=["Einfach"],
    health=["Vegan"],
    categories=["Pizza"],
    countries=["Italien"],
    meal_type=["Hauptspeise"],
    prep_times="30",
    ratings="4",
    sort="Bewertung"
)
recipes = retriever.get_recipes(search_query="Lasagne", page=1)
retriever.close()

Available Filter Options

  • properties: Einfach, Schnell, Basisrezepte, Preiswert
  • health: Vegetarisch, Vegan, Kalorienarm, Low Carb, Ketogen, Paleo, Fettarm, Trennkost, Vollwert
  • categories: Auflauf, Pizza, Reis- oder Nudelsalat, Salat, Salatdressing, Tarte, Fingerfood, Dips, Saucen, Suppe, Klöße, Brot und Brötchen, Brotspeise, Aufstrich, Süßspeise, Eis, Kuchen, Kekse, Torte, Confiserie, Getränke, Shake, Gewürzmischung, Pasten, Studentenküche
  • countries: Deutschland, Italien, Spanien, Portugal, Frankreich, England, Osteuropa, Skandinavien, Griechenland, Türkei, Russland, Naher Osten, Asien, Indien, Japan, Amerika, Mexiko, Karibik, Lateinamerika, Afrika, Marokko, Ägypten, Australien
  • meal_type: Hauptspeise, Vorspeise, Beilage, Dessert, Snack, Frühstück
  • prep_times: 15, 30, 60, 120, Alle
  • ratings: Alle, 2, 3, 4, Top
  • sort: Empfehlung, Bewertung, Neuheiten

🧹 Session Management

All retrievers (RandomRetriever, DailyRecipeRetriever, SearchRetriever) use a persistent HTTP session. Always call close() when done to free resources.


💁 Contributing

As an open-source initiative in a rapidly evolving domain, I welcome contributions, be it through the addition of new features or the improvement of existing ones. If you have any suggestions, bug reports, or annoyances, please report them to the issue tracker.


📃 License

This project is licensed under the MIT License - see the LICENSE file for details.

Release files for python-chefkoch 2.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-chefkoch 2.1.2
File Size Uploaded
python_chefkoch-2.1.2.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-chefkoch 2.1.2
File Interpreter ABI Platform
python_chefkoch-2.1.2-py3-none-any.whl Python 3 none any Details

Total release size:20.0 kB

Release files / python_chefkoch-2.1.2.tar.gz

Download URL python_chefkoch-2.1.2.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0b7dd2c179a01ff47103020c7e36456aceb1448fb051be547c984935b5591ce8
BLAKE2b-256 checksum
How to use checksums
944f254eecc1e241b322d14847738a06e2106ec005ad7015fade23b37f76b0f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.1 Linux/6.8.0-1030-azure

Release files / python_chefkoch-2.1.2-py3-none-any.whl

Download URL python_chefkoch-2.1.2-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f489147f4903103bba6548bcf8477eb863bc127da6f7719545bf0955ede3f4c2
BLAKE2b-256 checksum
How to use checksums
dc3cb668e84afe33d5127f0c676fe723f575d50a7627e1b869378f15f44b009b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.1 Linux/6.8.0-1030-azure

Release history Release notifications | RSS feed

This release

2.1.2 This release

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page