This module is low level API for [init_app_conf.py](https://github.com/alex-ber/AlexBerUtils/blob/master/alexber/utils/init_app_conf.py)[deploys.py](https://github.com/alex-ber/AlexBerUtils/blob/master/alexber/utils/deploys.py). It is also optionally used in [emails.py](https://github.com/alex-ber/AlexBerUtils/blob/master/alexber/utils/emails.py)``.

This is essentially wrapper arround HiYaPyCo project with streamlined and extended API and couple of work-arrounds.

The source code you can found here. It is available as part of my AlexBerUtils s project.

You can install AlexBerUtils from PyPi:

python3 -m pip install -U alex-ber-utils

You should also install some optional dependencies, such as jinja2. The easiest way is to run:

python3 -m pip install alex-ber-utils[yml]

**Note **also that hiyapyco should be at least 0.4.16.

See here for more details explanation on how to install.


Actually, this module was started as part of [init_app_conf](https://github.com/alex-ber/AlexBerUtils/blob/master/alexber/utils/init_app_conf.py) module. I’ve needed functionality for merging multiple Yml files to one. Basically, I had some default file with key/value, I have another files where I can optionally override some keys with other value. I have found that hiyapyco project is mostly can do what I’ve describe above.

It had 2 modes, METHOD_SIMPLE and and METHOD_MERGE.

METHOD_SIMPLE assumes that yml file has only primitive type, list with primitive type and dict with primitive keys. (It has also some weird functionality that allows you to merge inappropriate types, such as list with dict, that I’m ignoring). It has some weird list merging. If I have first list with 2 items, and second list with 3 items, I will get merged list with only first 2 items from the second list.

#parse #yaml #libraries #python3 #python

My ymlparsers module
1.25 GEEK