Metadata-Version: 2.1
Name: pybeeryaml
Version: 1.1
Summary: PyBeerYAML A YAML format parser for beer storage
Home-page: https://pythonhosted.org/pybeeryaml/
Author: TROUVERIE Joachim
Author-email: joachim.trouverie@linoame.fr
License: UNKNOWN
Download-URL: https://github.com/j0ack/pybeeryaml
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Utilities
Requires-Dist: pyyaml

pybeeryaml
==========

|version| |license| |travis|

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 <http://beerxml.com/>`_ 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 <https://docs.pytest.org/en/latest/>`_.

.. 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
.. |travis| image::  https://img.shields.io/travis/j0ack/pybeeryaml.svg


