Skip to main content

A tool for generating table-based recipe descriptions.

Project description

Recipe Grid is a collection of standalone utilities and also a Python library for describing recipes in a tabular form, as illustrated by the following (rather tasty) recipe below for tiffin:

docs/source/_static/tiffin_example.png

These recipes have several advantages over traditional recipe descriptions:

  • Recipes are typically more concise.

  • Ingredients and method are shown together so no need to cross-reference between the two.

  • Parts of the method are never “hidden” in an ingredients list (e.g. ‘1 onion, finely chopped’)

  • Opportunities to reorder steps or do them in parallel (or not!) are easy to spot while still providing a suggested order.

Recipes are described in Markdown files using a convenient to write recipe description language. For example, the recipe above was generated from the following Markdown:

Tiffin
======

A delicious, chocolatey treat.

    6 tsp of cocoa powder
    2 tbsp of golden syrup
    1/2 cup of butter
    1/2 cup of sugar
    16oz of digestives
    200g of chocolate

    cover(
        mix(
            heat until bubbling (cocoa powder, golden syrup, butter, sugar),
            crush(digestives)
        ),
        melt(chocolate)
    )

Getting Started

You can install recipe grid from PyPI using:

$ pip install recipe_grid

Then head over to the tutorial or jump straight into the main documentation.

Development

Development dependencies, and an editable install can be setup using:

$ pip install -e .
$ pip install -r requirements-test.txt

Tests can be run using:

$ pytest

Other pre-commit hooks can be run using:

$ pre-commit run -a

And build the documentation using:

$ pip install -r requirements-docs.txt
$ make -C docs html

What about version 1?

Recipe Grid 2 is a rewrite/reimagining of its predecessor which ended up being one of those quick hacks which went on to live for a great many years. Recipe Grid 2’s recipe format is not quite backward compatible but is largely a superset of the old format and upgrading existing recipes is not an arduous task.

Recipe Grid 2 has many additional features while retaining a very similar recipe description language. Key improvements include:

  • More consistent recipe syntax and data model

  • Recipes live within Markdown files

  • Supports Directed Acyclic Graph (DAG) recipes; not just trees

  • Can scale more than just ingredient quantities in a recipe

  • Better error messages

  • Fewer foot-guns

  • Linter included to spot common errors

  • Better HTML rendering
    • Improved readability

    • Includes mouseover unit conversions

    • Native serving counts and applied scaling more clearly indicated

  • Better static sites
    • Links to alternative scaling of recipes

    • Browse without selecting a scale

    • Clearer navigation

    • Supports multiple levels of hierarchy

    • Supports custom messages on home and category pages

    • Much faster and more robust static site generator

  • Extensive documentation

  • Large test suite

  • (Limited) Python API for parsing and inspecting recipes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

recipe_grid-2.1.0.tar.gz (184.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

recipe_grid-2.1.0-py3-none-any.whl (90.6 kB view details)

Uploaded Python 3

File details

Details for the file recipe_grid-2.1.0.tar.gz.

File metadata

  • Download URL: recipe_grid-2.1.0.tar.gz
  • Upload date:
  • Size: 184.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for recipe_grid-2.1.0.tar.gz
Algorithm Hash digest
SHA256 3cb23afe75343eb554a7f55fcb5d2e3af248e82428e43bf85f1cb33075e8bc06
MD5 93f2a67a00d450077fb59b4412c03f41
BLAKE2b-256 71d837921d424d1a2dd49f18451ce5eacd8b57c852db169cded2d915ed5f44b4

See more details on using hashes here.

File details

Details for the file recipe_grid-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: recipe_grid-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 90.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for recipe_grid-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab071af000a44a19afe8018c1257c063dc3f2fafe1093af6e025b48c5a998c65
MD5 e931126c145b2c0405ec798bf9533911
BLAKE2b-256 8ae2e040a6e1f2965ba1df4d526bd4c4e2b14992b696abc2f25b5333659bbc3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page