https://github.com/j0ack/pybeeryaml
mirrored from https://git.joakode.fr/pybeeryaml
https://github.com/j0ack/pybeeryaml
beers beerxml brewing brewing-recipes
Last synced: about 1 month ago
JSON representation
mirrored from https://git.joakode.fr/pybeeryaml
- Host: GitHub
- URL: https://github.com/j0ack/pybeeryaml
- Owner: j0ack
- License: gpl-3.0
- Created: 2018-04-10T07:42:07.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-30T07:48:53.000Z (over 4 years ago)
- Last Synced: 2025-03-09T11:02:53.384Z (about 2 months ago)
- Topics: beers, beerxml, brewing, brewing-recipes
- Language: Python
- Homepage: http://docs.joakode.fr/pybeeryaml/
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
pybeeryaml
==========|version| |license| |drone|
A YAML format parser for beer storage
Parse a recipe from a YAML file and returns an object containing ingredients and
metadata. Supports export to `beerxml `_ format.Installation
------------.. code:: sh
pip install pybeeryaml
Usage
-----.. code:: python
from pybeeryaml import Recipe
path_to_beeryaml_file = "/tmp/my_recipe.yml"
# create recipe from file
recipe = Recipe.from_file(path_to_beeryaml_file)# or from string
with open(path_to_beeryaml_file, "r") as mybeer:
recipe2 = Recipe.from_yaml(mybeer.read())assert recipe == recipe2 # True
# convert to beerxml format
recipexml = recipe.to_xml()Testing
-------Unit tests can be run with `pytest `_.
.. code:: sh
py.test tests
.. |version| image:: https://img.shields.io/pypi/v/pybeeryaml.svg
.. |license| image:: https://img.shields.io/github/license/j0ack/pybeeryaml.svg
.. |drone| image:: https://drone.joakode.fr/api/badges/joack/pybeeryaml/status.svg