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
Metadata
Release files for pybeeryaml 1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pybeeryaml-1.3.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pybeeryaml-1.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 29.5 kB
Release files / pybeeryaml-1.3.tar.gz
| Download URL | pybeeryaml-1.3.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed2428dd22ddd1e8a0fd4b06de2a14ee15afa1075c9c646bfb0fe1bea85bb022
|
|
BLAKE2b-256 checksum How to use checksums |
dd574a34b41f0ea0af5ecd5224af5702ea11889af26f5418f6ba3e3e5531fc5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / pybeeryaml-1.3-py2.py3-none-any.whl
| Download URL | pybeeryaml-1.3-py2.py3-none-any.whl |
|---|---|
| Size | 23.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
71a0cead26f80c28c442db9cbcee439ecc9b978f759a987f0d6a0fa80901792a
|
|
BLAKE2b-256 checksum How to use checksums |
de5ff1ff9b754c8f0ad09b12d7c199d2b5c669005b7674b3549592e1a2b85d3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|