OEP / pyprika

Python recipe parsing and manipulation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pyprika

A recipe management library and command line tool.

https://travis-ci.org/OEP/pyprika.svg?branch=develop

Primary features:

  • A YAML file format for encoding recipes.
  • Parser written for human-friendly syntax.

See the documentation for a more complete discussion.

Example

>>> import pyprika
>>> recipe = pyprika.load(open('example.yaml'))
>>> recipe.name
'Salt Water'
>>> recipe.ingredients
[<Ingredient: (1 cup) water>, <Ingredient: (1 cup) salt>, <Ingredient: pepper>]
>>> recipe.directions
['Put it in a pot.', 'Boil it up.', 'Glug glug glug.']
>>> more_recipe = 2 * recipe
>>> more_recipe.ingredients
[<Ingredient: (2 cup) water>, <Ingredient: (2 cup) salt>, <Ingredient: pepper>]

About

Python recipe parsing and manipulation

License:MIT License


Languages

Language:Python 85.9%Language:Makefile 14.1%