Skip to main content

PyBeerYAML A YAML format parser for beer storage

Project description

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

pip install pybeeryaml

Usage

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.

py.test tests

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

pybeeryaml-1.3.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

pybeeryaml-1.3-py2.py3-none-any.whl (23.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pybeeryaml-1.3.tar.gz.

File metadata

  • Download URL: pybeeryaml-1.3.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for pybeeryaml-1.3.tar.gz
Algorithm Hash digest
SHA256 ed2428dd22ddd1e8a0fd4b06de2a14ee15afa1075c9c646bfb0fe1bea85bb022
MD5 4103414c4574c23a44abcdee21bce6f6
BLAKE2b-256 dd574a34b41f0ea0af5ecd5224af5702ea11889af26f5418f6ba3e3e5531fc5b

See more details on using hashes here.

File details

Details for the file pybeeryaml-1.3-py2.py3-none-any.whl.

File metadata

  • Download URL: pybeeryaml-1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for pybeeryaml-1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 71a0cead26f80c28c442db9cbcee439ecc9b978f759a987f0d6a0fa80901792a
MD5 c3ef0d87d8922d76bbb95e8bcb5e25a2
BLAKE2b-256 de5ff1ff9b754c8f0ad09b12d7c199d2b5c669005b7674b3549592e1a2b85d3e

See more details on using hashes here.

Supported by

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