HiYaPyCo


NameHiYaPyCo JSON
Version 0.7.0 PyPI version JSON
download
home_pagehttps://github.com/zerwes/hiyapyco
SummaryHierarchical Yaml Python Config
upload_time2024-10-20 04:14:00
maintainerNone
docs_urlNone
authorKlaus Zerwes zero-sys.net
requires_pythonNone
licenseGPLv3
keywords configuration parser yaml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. |pylint| image:: https://github.com/zerwes/hiyapyco/actions/workflows/pylint.yml/badge.svg?branch=main
    :target: https://github.com/zerwes/hiyapyco/actions/workflows/pylint.yml
.. |test| image:: https://github.com/zerwes/hiyapyco/actions/workflows/test.yml/badge.svg
     :target: https://github.com/zerwes/hiyapyco/actions/workflows/test.yml
.. |gpl| image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg
     :target: http://www.gnu.org/licenses/gpl-3.0

|pylint| |test| |gpl|

hiyapyco
========

HiYaPyCo - A Hierarchical Yaml Python Config

Description
-----------

A simple python lib allowing hierarchical overlay of config files in
YAML syntax, offering different merge methods and variable interpolation
based on jinja2.

The goal was to have something similar to puppets hiera
``merge_behavior: deeper`` for python.

Key Features
------------

-  hierarchical overlay of multiple YAML files
-  multiple merge methods for hierarchical YAML files
-  variable interpolation using jinja2

Requirements
------------

-  PyYAML aka. python3-yaml
-  Jinja2 aka. python3-jinja2

Python Version
~~~~~~~~~~~~~~

HiYaPyCo was designed to run on current major python versions
without changes. Tested versions:

-  3.9
-  3.11

Usage
-----

A simple example:

::

    import hiyapyco
    conf = hiyapyco.load('yamlfile1' [,'yamlfile2' [,'yamlfile3' [...]]] [,kwargs])
    print(hiyapyco.dump(conf, default_flow_style=False))

real life example:
~~~~~~~~~~~~~~~~~~

``yaml1.yaml``:

::

    ---
    first: first element
    second: xxx
    deep:
        k1:
            - 1
            - 2

``yaml2.yaml``:

::

    ---
    second: again {{ first }}
    deep:
        k1:
            - 4 
            - 6
        k2:
            - 3
            - 6

load ...

::

    >>> import pprint
    >>> import hiyapyco
    >>> conf = hiyapyco.load('yaml1.yaml', 'yaml2.yaml', method=hiyapyco.METHOD_MERGE, interpolate=True, failonmissingfiles=True)
    >>> pprint.PrettyPrinter(indent=4).pprint(conf)
    {   'deep': {   'k1': [1, 2, 4, 6], 'k2': [3, 6]},
        'first': u'first element',
        'ma': {   'ones': u'12', 'sum': u'22'},
        'second': u'again first element'}

real life example using yaml documents as strings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

::

    >>> import hiyapyco
    >>> y1="""
    ... yaml: 1
    ... y:
    ...   y1: abc
    ...   y2: xyz
    ... """
    >>> y2="""
    ... yaml: 2
    ... y:
    ...   y2: def
    ...   y3: XYZ
    ... """
    >>> conf = hiyapyco.load([y1, y2], method=hiyapyco.METHOD_MERGE)
    >>> print (conf)
    OrderedDict([('yaml', 2), ('y', OrderedDict([('y1', 'abc'), ('y2', 'def'), ('y3', 'XYZ')]))])
    >>> hiyapyco.dump(conf, default_flow_style=True)
    '{yaml: 2, y: {y1: abc, y2: def, y3: XYZ}}\n'

args
~~~~

All ``args`` are handled as *file names* or *yaml documents*. They may
be strings or list of strings.

kwargs
~~~~~~

-  ``method``: bit (one of the listed below):

   -  ``hiyapyco.METHOD_SIMPLE``: replace values (except for lists a
      simple merge is performed) (default method)
   -  ``hiyapyco.METHOD_MERGE``: perform a deep merge
   -  ``hiyapyco.METHOD_SUBSTITUTE``: perform a merge w/ lists substituted (unsupported)

- ``mergelists``: boolean try to merge lists of dict (default: ``True``)

- ``none_behavior``: bit (one of the listed below):

   -  ``hiyapyco.NONE_BEHAVIOR_DEFAULT``: attempt to merge the value with ``None`` and fail if this is not possible (default method)
   -  ``hiyapyco.NONE_BEHAVIOR_OVERRIDE``: ``None`` always overrides any other value.

-  ``interpolate``: boolean : perform interpolation after the merge
   (default: ``False``)

-  ``castinterpolated``: boolean : try to perform a *best possible
   match* cast for interpolated strings (default: ``False``)

-  ``usedefaultyamlloader``: boolean : force the usage of the default
   *PyYAML* loader/dumper instead of *HiYaPyCo*\ s implementation of a
   OrderedDict loader/dumper (see: Ordered Dict Yaml Loader / Dumper
   aka. ODYLDo) (default: ``False``)

- ``dereferenceyamlanchors``: boolean : dereference yaml anchors and use a copy (default: ``True``)

- ``encoding``: string : encoding used to read yaml files (default: ``utf-8``)

-  ``failonmissingfiles``: boolean : fail if a supplied YAML file can
   not be found (default: ``True``)

-  ``loglevel``: int : loglevel for the hiyapyco logger; should be one
   of the valid levels from ``logging``: 'WARN', 'ERROR', 'DEBUG', 'I
   NFO', 'WARNING', 'CRITICAL', 'NOTSET' (default: default of
   ``logging``)

-  ``loglevelmissingfiles``: int : one of the valid levels from
   ``logging``: 'WARN', 'ERROR', 'DEBUG', 'INFO', 'WARNING', 'CRITICAL',
   'NOTSET' (default: ``logging.ERROR`` if
   ``failonmissingfiles = True``, else ``logging.WARN``)

-  ``mergeoverride``: optional function to customize merge for primitive values
   (see `PR #76 <https://github.com/zerwes/hiyapyco/pull/76>`_.)

-  ``loader_callback``: optional custom callback function to load yaml files.
    The callback function shall behave like ``yaml.load_all`` from PyYAML,
    taking a IO stream as input and returning a list of objects.
    Using this method, for example `ruamel <https://pypi.org/project/ruamel.yaml/>`_
    can be used instead of PyYAML etc.

interpolation
~~~~~~~~~~~~~

For using interpolation, I strongly recomend *not* to use the default
PyYAML loader, as it sorts the dict entrys alphabetically, a fact that
may break interpolation in some cases (see ``test/odict.yaml`` and
``test/test_odict.py`` for an example). See Ordered Dict Yaml Loader /
Dumper aka. ODYLDo

default
^^^^^^^

The default jinja2.Environment for the interpolation is

::

    hiyapyco.jinja2env = Environment(undefined=Undefined)

This means that undefined vars will be ignored and replaced with a empty
string.

change the jinja2 Environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you like to change the jinja2 Environment used for the interpolation,
set ``hiyapyco.jinja2env`` **before** calling ``hiyapyco.load``!

use jinja2 DebugUndefined
^^^^^^^^^^^^^^^^^^^^^^^^^

If you like to keep the undefined var as string but raise no error, use

::

    from jinja2 import Environment, Undefined, DebugUndefined, StrictUndefined
    hiyapyco.jinja2env = Environment(undefined=DebugUndefined)

use jinja2 StrictUndefined
^^^^^^^^^^^^^^^^^^^^^^^^^^

If you like to raise a error on undefined vars, use

::

    from jinja2 import Environment, Undefined, DebugUndefined, StrictUndefined
    hiyapyco.jinja2env = Environment(undefined=StrictUndefined)

This will raise a ``hiyapyco.HiYaPyCoImplementationException`` wrapped
arround the ``jinja2.UndefinedError`` pointing at the string causing the
error.

more informations
^^^^^^^^^^^^^^^^^

See:
`jinja2.Environment <http://jinja.pocoo.org/docs/dev/api/#jinja2.Environment>`_

cast interpolated strings
~~~~~~~~~~~~~~~~~~~~~~~~~

As you must use interpolation as strings (PyYAML will weep if you try to
start a value with ``{{``), you can set ``castinterpolated`` to *True*
in order to try to get a ``best match`` cast for the interpolated
values. **The ``best match`` cast is currently only a q&d implementation
and may not give you the expected results!**

Ordered Dict Yaml Loader / Dumper aka. ODYLDo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is a simple implementation of a PyYAML loader / dumper using
``OrderedDict`` from collections.
**Because chaos is fun but order matters on loading dicts from a yaml
file.**


Install
-------

From Source
~~~~~~~~~~~

GitHub
^^^^^^

`https://github.com/zerwes/hiyapyco <https://github.com/zerwes/hiyapyco>`_

::

    git clone https://github.com/zerwes/hiyapyco
    cd hiyapyco
    sudo python setup.py install

PyPi
^^^^

Download the latest or desired version of the source package from
`https://pypi.python.org/pypi/HiYaPyCo <https://pypi.python.org/pypi/HiYaPyCo>`_.
Unpack the archive and install by executing:

::

    sudo python setup.py install

pip
~~~

Install the latest wheel package using:

::

    pip install HiYaPyCo

debian packages
~~~~~~~~~~~~~~~

install the latest debian packages from http://repo.zero-sys.net/hiyapyco::

    # create the sources list file:
    sudo echo "deb http://repo.zero-sys.net/hiyapyco/deb ./" > /etc/apt/sources.list.d/hiyapyco.list

    # import the key:
    gpg --keyserver keys.gnupg.net --recv-key 77DE7FB4
    # or use:
    wget https://repo.zero-sys.net/77DE7FB4.asc -O - | gpg --import -

    # apt tasks:
    gpg --armor --export 77DE7FB4 | sudo tee /etc/apt/trusted.gpg.d/hiyapyco.asc
    sudo apt-get update
    sudo apt-get install python3-hiyapyco

a ansible playbook exists: https://github.com/zerwes/ansible-role-hiyapyco

rpm packages
~~~~~~~~~~~~

use
`http://repo.zero-sys.net/hiyapyco/rpm <http://repo.zero-sys.net/hiyapyco/rpm>`_
as URL for the yum repo and
`https://repo.zero-sys.net/77DE7FB4.asc <https://repo.zero-sys.net/77DE7FB4.asc>`_
as the URL for the key.

Arch Linux
~~~~~~~~~~

An `AUR package <https://aur.archlinux.org/packages/python-hiyapyco/>`_
is available (provided by `Pete Crighton <https://github.com/PeteCrighton>`_ and not always up to date).

License
-------

Copyright |copy| 2014 - 2024 Klaus Zerwes `zero-sys.net <https://zero-sys.net>`_

.. |copy| unicode:: 0xA9 .. copyright sign

This package is free software.
This software is licensed under the terms of the GNU GENERAL PUBLIC
LICENSE version 3 or later, as published by the Free Software
Foundation.
See
`https://www.gnu.org/licenses/gpl.html <https://www.gnu.org/licenses/gpl.html>`_

Changelog
---------

0.7.0
~~~~~~

MERGED: allow custom yaml loaders as callback functions by @grst (PR #77)

MERGED: implement none-behavior strategies by @grst (PR #78)

MERGED: update markupsafe requirement from <3 to <4 (#80)

IMPROVED: added some example how to use ruamel

0.6.1
~~~~~~

MERGED: #76 Override mechanism for primitive value merge by malachib

IMPROVED: added link to ansible playbook

0.6.0
~~~~~~

FIXED: #69 (weird merge behavior with anchors)

MERGED: #71 (dereference anchors)

0.5.6
~~~~~~

MERGED: #70 by itachi-cracker

FIXED: #61 (removed deprecated distutils)

0.5.5
~~~~~~

FIXED: #67 cosmetic changes

0.5.4
~~~~~~

FIXED: #60 recursive calls to _substmerge

IMPROVED: testing and python support (3.11)

0.5.1
~~~~~~

MERGED: #52 by ryanfaircloth

0.5.0
~~~~~~

MERGED: #41 Jinja2 dependency increased to include Jinja2 3.x.x

REMOVED: Support for Python 2

0.4.16
~~~~~~

MERGED: #37 alex-ber

0.4.15
~~~~~~

MERGED: #30 lesiak:issue-30-utf

MERGED: #28 lesiak:issue-28

0.4.14
~~~~~~

FIXED: issue #33

MERGED: issue #32

0.4.13
~~~~~~

IMPLEMENTED: [issue #27] support multiple yaml documents in one file

0.4.12
~~~~~~

FIXED: logging by Regev Golan

0.4.11
~~~~~~

IMPLEMENTED: mergelists (see issue #25)

0.4.10
~~~~~~

FIXED: issue #24 repo signing

0.4.9
~~~~~

FIXED: issue #23 loglevelonmissingfiles

0.4.8
~~~~~

Fixed pypi doc

0.4.7
~~~~~

Reverted: logger settings to initial state

Improved: dump

Merged:

- flatten mapping from Chris Petersen geek@ex-nerd.com
- arch linux package info from Peter Crighton git@petercrighton.de

0.4.6
~~~~~

MERGED: fixes from mmariani

0.4.5
~~~~~

FIXED: issues #9 and #11

0.4.4
~~~~~

deb packages:

- removed support for python 2.6
- include examples as doc

0.4.3
~~~~~

FIXED: issue #6 *import of hiyapyco **version** in setup.py causes pip
install failures*

0.4.2
~~~~~

Changed: moved to GPL

Improvements: missing files handling, doc

0.4.1
~~~~~

Implemented: ``castinterpolated``

0.4.0
~~~~~

Implemented: loading yaml docs from string

0.3.2
~~~~~

Improved tests and bool args checks

0.3.0 / 0.3.1
~~~~~~~~~~~~~

Implemented a Ordered Dict Yaml Loader

0.2.0
~~~~~

Fixed unicode handling

0.1.0 / 0.1.1
~~~~~~~~~~~~~

Initial release

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zerwes/hiyapyco",
    "name": "HiYaPyCo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "configuration parser yaml",
    "author": "Klaus Zerwes zero-sys.net",
    "author_email": "zerwes@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/4a/4c/48999f3383f99a4bb49723983147b2b4ef62f29fdeca81ec87cb0cc70d8c/HiYaPyCo-0.7.0.tar.gz",
    "platform": "any",
    "description": ".. |pylint| image:: https://github.com/zerwes/hiyapyco/actions/workflows/pylint.yml/badge.svg?branch=main\n    :target: https://github.com/zerwes/hiyapyco/actions/workflows/pylint.yml\n.. |test| image:: https://github.com/zerwes/hiyapyco/actions/workflows/test.yml/badge.svg\n     :target: https://github.com/zerwes/hiyapyco/actions/workflows/test.yml\n.. |gpl| image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg\n     :target: http://www.gnu.org/licenses/gpl-3.0\n\n|pylint| |test| |gpl|\n\nhiyapyco\n========\n\nHiYaPyCo - A Hierarchical Yaml Python Config\n\nDescription\n-----------\n\nA simple python lib allowing hierarchical overlay of config files in\nYAML syntax, offering different merge methods and variable interpolation\nbased on jinja2.\n\nThe goal was to have something similar to puppets hiera\n``merge_behavior: deeper`` for python.\n\nKey Features\n------------\n\n-  hierarchical overlay of multiple YAML files\n-  multiple merge methods for hierarchical YAML files\n-  variable interpolation using jinja2\n\nRequirements\n------------\n\n-  PyYAML aka. python3-yaml\n-  Jinja2 aka. python3-jinja2\n\nPython Version\n~~~~~~~~~~~~~~\n\nHiYaPyCo was designed to run on current major python versions\nwithout changes. Tested versions:\n\n-  3.9\n-  3.11\n\nUsage\n-----\n\nA simple example:\n\n::\n\n    import hiyapyco\n    conf = hiyapyco.load('yamlfile1' [,'yamlfile2' [,'yamlfile3' [...]]] [,kwargs])\n    print(hiyapyco.dump(conf, default_flow_style=False))\n\nreal life example:\n~~~~~~~~~~~~~~~~~~\n\n``yaml1.yaml``:\n\n::\n\n    ---\n    first: first element\n    second: xxx\n    deep:\n        k1:\n            - 1\n            - 2\n\n``yaml2.yaml``:\n\n::\n\n    ---\n    second: again {{ first }}\n    deep:\n        k1:\n            - 4 \n            - 6\n        k2:\n            - 3\n            - 6\n\nload ...\n\n::\n\n    >>> import pprint\n    >>> import hiyapyco\n    >>> conf = hiyapyco.load('yaml1.yaml', 'yaml2.yaml', method=hiyapyco.METHOD_MERGE, interpolate=True, failonmissingfiles=True)\n    >>> pprint.PrettyPrinter(indent=4).pprint(conf)\n    {   'deep': {   'k1': [1, 2, 4, 6], 'k2': [3, 6]},\n        'first': u'first element',\n        'ma': {   'ones': u'12', 'sum': u'22'},\n        'second': u'again first element'}\n\nreal life example using yaml documents as strings\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n    >>> import hiyapyco\n    >>> y1=\"\"\"\n    ... yaml: 1\n    ... y:\n    ...   y1: abc\n    ...   y2: xyz\n    ... \"\"\"\n    >>> y2=\"\"\"\n    ... yaml: 2\n    ... y:\n    ...   y2: def\n    ...   y3: XYZ\n    ... \"\"\"\n    >>> conf = hiyapyco.load([y1, y2], method=hiyapyco.METHOD_MERGE)\n    >>> print (conf)\n    OrderedDict([('yaml', 2), ('y', OrderedDict([('y1', 'abc'), ('y2', 'def'), ('y3', 'XYZ')]))])\n    >>> hiyapyco.dump(conf, default_flow_style=True)\n    '{yaml: 2, y: {y1: abc, y2: def, y3: XYZ}}\\n'\n\nargs\n~~~~\n\nAll ``args`` are handled as *file names* or *yaml documents*. They may\nbe strings or list of strings.\n\nkwargs\n~~~~~~\n\n-  ``method``: bit (one of the listed below):\n\n   -  ``hiyapyco.METHOD_SIMPLE``: replace values (except for lists a\n      simple merge is performed) (default method)\n   -  ``hiyapyco.METHOD_MERGE``: perform a deep merge\n   -  ``hiyapyco.METHOD_SUBSTITUTE``: perform a merge w/ lists substituted (unsupported)\n\n- ``mergelists``: boolean try to merge lists of dict (default: ``True``)\n\n- ``none_behavior``: bit (one of the listed below):\n\n   -  ``hiyapyco.NONE_BEHAVIOR_DEFAULT``: attempt to merge the value with ``None`` and fail if this is not possible (default method)\n   -  ``hiyapyco.NONE_BEHAVIOR_OVERRIDE``: ``None`` always overrides any other value.\n\n-  ``interpolate``: boolean : perform interpolation after the merge\n   (default: ``False``)\n\n-  ``castinterpolated``: boolean : try to perform a *best possible\n   match* cast for interpolated strings (default: ``False``)\n\n-  ``usedefaultyamlloader``: boolean : force the usage of the default\n   *PyYAML* loader/dumper instead of *HiYaPyCo*\\ s implementation of a\n   OrderedDict loader/dumper (see: Ordered Dict Yaml Loader / Dumper\n   aka. ODYLDo) (default: ``False``)\n\n- ``dereferenceyamlanchors``: boolean : dereference yaml anchors and use a copy (default: ``True``)\n\n- ``encoding``: string : encoding used to read yaml files (default: ``utf-8``)\n\n-  ``failonmissingfiles``: boolean : fail if a supplied YAML file can\n   not be found (default: ``True``)\n\n-  ``loglevel``: int : loglevel for the hiyapyco logger; should be one\n   of the valid levels from ``logging``: 'WARN', 'ERROR', 'DEBUG', 'I\n   NFO', 'WARNING', 'CRITICAL', 'NOTSET' (default: default of\n   ``logging``)\n\n-  ``loglevelmissingfiles``: int : one of the valid levels from\n   ``logging``: 'WARN', 'ERROR', 'DEBUG', 'INFO', 'WARNING', 'CRITICAL',\n   'NOTSET' (default: ``logging.ERROR`` if\n   ``failonmissingfiles = True``, else ``logging.WARN``)\n\n-  ``mergeoverride``: optional function to customize merge for primitive values\n   (see `PR #76 <https://github.com/zerwes/hiyapyco/pull/76>`_.)\n\n-  ``loader_callback``: optional custom callback function to load yaml files.\n    The callback function shall behave like ``yaml.load_all`` from PyYAML,\n    taking a IO stream as input and returning a list of objects.\n    Using this method, for example `ruamel <https://pypi.org/project/ruamel.yaml/>`_\n    can be used instead of PyYAML etc.\n\ninterpolation\n~~~~~~~~~~~~~\n\nFor using interpolation, I strongly recomend *not* to use the default\nPyYAML loader, as it sorts the dict entrys alphabetically, a fact that\nmay break interpolation in some cases (see ``test/odict.yaml`` and\n``test/test_odict.py`` for an example). See Ordered Dict Yaml Loader /\nDumper aka. ODYLDo\n\ndefault\n^^^^^^^\n\nThe default jinja2.Environment for the interpolation is\n\n::\n\n    hiyapyco.jinja2env = Environment(undefined=Undefined)\n\nThis means that undefined vars will be ignored and replaced with a empty\nstring.\n\nchange the jinja2 Environment\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIf you like to change the jinja2 Environment used for the interpolation,\nset ``hiyapyco.jinja2env`` **before** calling ``hiyapyco.load``!\n\nuse jinja2 DebugUndefined\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIf you like to keep the undefined var as string but raise no error, use\n\n::\n\n    from jinja2 import Environment, Undefined, DebugUndefined, StrictUndefined\n    hiyapyco.jinja2env = Environment(undefined=DebugUndefined)\n\nuse jinja2 StrictUndefined\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIf you like to raise a error on undefined vars, use\n\n::\n\n    from jinja2 import Environment, Undefined, DebugUndefined, StrictUndefined\n    hiyapyco.jinja2env = Environment(undefined=StrictUndefined)\n\nThis will raise a ``hiyapyco.HiYaPyCoImplementationException`` wrapped\narround the ``jinja2.UndefinedError`` pointing at the string causing the\nerror.\n\nmore informations\n^^^^^^^^^^^^^^^^^\n\nSee:\n`jinja2.Environment <http://jinja.pocoo.org/docs/dev/api/#jinja2.Environment>`_\n\ncast interpolated strings\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAs you must use interpolation as strings (PyYAML will weep if you try to\nstart a value with ``{{``), you can set ``castinterpolated`` to *True*\nin order to try to get a ``best match`` cast for the interpolated\nvalues. **The ``best match`` cast is currently only a q&d implementation\nand may not give you the expected results!**\n\nOrdered Dict Yaml Loader / Dumper aka. ODYLDo\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis is a simple implementation of a PyYAML loader / dumper using\n``OrderedDict`` from collections.\n**Because chaos is fun but order matters on loading dicts from a yaml\nfile.**\n\n\nInstall\n-------\n\nFrom Source\n~~~~~~~~~~~\n\nGitHub\n^^^^^^\n\n`https://github.com/zerwes/hiyapyco <https://github.com/zerwes/hiyapyco>`_\n\n::\n\n    git clone https://github.com/zerwes/hiyapyco\n    cd hiyapyco\n    sudo python setup.py install\n\nPyPi\n^^^^\n\nDownload the latest or desired version of the source package from\n`https://pypi.python.org/pypi/HiYaPyCo <https://pypi.python.org/pypi/HiYaPyCo>`_.\nUnpack the archive and install by executing:\n\n::\n\n    sudo python setup.py install\n\npip\n~~~\n\nInstall the latest wheel package using:\n\n::\n\n    pip install HiYaPyCo\n\ndebian packages\n~~~~~~~~~~~~~~~\n\ninstall the latest debian packages from http://repo.zero-sys.net/hiyapyco::\n\n    # create the sources list file:\n    sudo echo \"deb http://repo.zero-sys.net/hiyapyco/deb ./\" > /etc/apt/sources.list.d/hiyapyco.list\n\n    # import the key:\n    gpg --keyserver keys.gnupg.net --recv-key 77DE7FB4\n    # or use:\n    wget https://repo.zero-sys.net/77DE7FB4.asc -O - | gpg --import -\n\n    # apt tasks:\n    gpg --armor --export 77DE7FB4 | sudo tee /etc/apt/trusted.gpg.d/hiyapyco.asc\n    sudo apt-get update\n    sudo apt-get install python3-hiyapyco\n\na ansible playbook exists: https://github.com/zerwes/ansible-role-hiyapyco\n\nrpm packages\n~~~~~~~~~~~~\n\nuse\n`http://repo.zero-sys.net/hiyapyco/rpm <http://repo.zero-sys.net/hiyapyco/rpm>`_\nas URL for the yum repo and\n`https://repo.zero-sys.net/77DE7FB4.asc <https://repo.zero-sys.net/77DE7FB4.asc>`_\nas the URL for the key.\n\nArch Linux\n~~~~~~~~~~\n\nAn `AUR package <https://aur.archlinux.org/packages/python-hiyapyco/>`_\nis available (provided by `Pete Crighton <https://github.com/PeteCrighton>`_ and not always up to date).\n\nLicense\n-------\n\nCopyright |copy| 2014 - 2024 Klaus Zerwes `zero-sys.net <https://zero-sys.net>`_\n\n.. |copy| unicode:: 0xA9 .. copyright sign\n\nThis package is free software.\nThis software is licensed under the terms of the GNU GENERAL PUBLIC\nLICENSE version 3 or later, as published by the Free Software\nFoundation.\nSee\n`https://www.gnu.org/licenses/gpl.html <https://www.gnu.org/licenses/gpl.html>`_\n\nChangelog\n---------\n\n0.7.0\n~~~~~~\n\nMERGED: allow custom yaml loaders as callback functions by @grst (PR #77)\n\nMERGED: implement none-behavior strategies by @grst (PR #78)\n\nMERGED: update markupsafe requirement from <3 to <4 (#80)\n\nIMPROVED: added some example how to use ruamel\n\n0.6.1\n~~~~~~\n\nMERGED: #76 Override mechanism for primitive value merge by malachib\n\nIMPROVED: added link to ansible playbook\n\n0.6.0\n~~~~~~\n\nFIXED: #69 (weird merge behavior with anchors)\n\nMERGED: #71 (dereference anchors)\n\n0.5.6\n~~~~~~\n\nMERGED: #70 by itachi-cracker\n\nFIXED: #61 (removed deprecated distutils)\n\n0.5.5\n~~~~~~\n\nFIXED: #67 cosmetic changes\n\n0.5.4\n~~~~~~\n\nFIXED: #60 recursive calls to _substmerge\n\nIMPROVED: testing and python support (3.11)\n\n0.5.1\n~~~~~~\n\nMERGED: #52 by ryanfaircloth\n\n0.5.0\n~~~~~~\n\nMERGED: #41 Jinja2 dependency increased to include Jinja2 3.x.x\n\nREMOVED: Support for Python 2\n\n0.4.16\n~~~~~~\n\nMERGED: #37 alex-ber\n\n0.4.15\n~~~~~~\n\nMERGED: #30 lesiak:issue-30-utf\n\nMERGED: #28 lesiak:issue-28\n\n0.4.14\n~~~~~~\n\nFIXED: issue #33\n\nMERGED: issue #32\n\n0.4.13\n~~~~~~\n\nIMPLEMENTED: [issue #27] support multiple yaml documents in one file\n\n0.4.12\n~~~~~~\n\nFIXED: logging by Regev Golan\n\n0.4.11\n~~~~~~\n\nIMPLEMENTED: mergelists (see issue #25)\n\n0.4.10\n~~~~~~\n\nFIXED: issue #24 repo signing\n\n0.4.9\n~~~~~\n\nFIXED: issue #23 loglevelonmissingfiles\n\n0.4.8\n~~~~~\n\nFixed pypi doc\n\n0.4.7\n~~~~~\n\nReverted: logger settings to initial state\n\nImproved: dump\n\nMerged:\n\n- flatten mapping from Chris Petersen geek@ex-nerd.com\n- arch linux package info from Peter Crighton git@petercrighton.de\n\n0.4.6\n~~~~~\n\nMERGED: fixes from mmariani\n\n0.4.5\n~~~~~\n\nFIXED: issues #9 and #11\n\n0.4.4\n~~~~~\n\ndeb packages:\n\n- removed support for python 2.6\n- include examples as doc\n\n0.4.3\n~~~~~\n\nFIXED: issue #6 *import of hiyapyco **version** in setup.py causes pip\ninstall failures*\n\n0.4.2\n~~~~~\n\nChanged: moved to GPL\n\nImprovements: missing files handling, doc\n\n0.4.1\n~~~~~\n\nImplemented: ``castinterpolated``\n\n0.4.0\n~~~~~\n\nImplemented: loading yaml docs from string\n\n0.3.2\n~~~~~\n\nImproved tests and bool args checks\n\n0.3.0 / 0.3.1\n~~~~~~~~~~~~~\n\nImplemented a Ordered Dict Yaml Loader\n\n0.2.0\n~~~~~\n\nFixed unicode handling\n\n0.1.0 / 0.1.1\n~~~~~~~~~~~~~\n\nInitial release\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Hierarchical Yaml Python Config",
    "version": "0.7.0",
    "project_urls": {
        "Homepage": "https://github.com/zerwes/hiyapyco"
    },
    "split_keywords": [
        "configuration",
        "parser",
        "yaml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "033d3f847839e28e354873c81ebc3d3322d6e73d0d386971e84c178b45e82ff4",
                "md5": "6687d43b0b7e01e630166e5b11cd5118",
                "sha256": "d56ae0f746506955c6b0072f7338f1cd50661bfd07c7ee9b49175a085fcbaf41"
            },
            "downloads": -1,
            "filename": "HiYaPyCo-0.7.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6687d43b0b7e01e630166e5b11cd5118",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 24720,
            "upload_time": "2024-10-20T04:13:57",
            "upload_time_iso_8601": "2024-10-20T04:13:57.817975Z",
            "url": "https://files.pythonhosted.org/packages/03/3d/3f847839e28e354873c81ebc3d3322d6e73d0d386971e84c178b45e82ff4/HiYaPyCo-0.7.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4a4c48999f3383f99a4bb49723983147b2b4ef62f29fdeca81ec87cb0cc70d8c",
                "md5": "427a8b2c79297c626e41c34368745bff",
                "sha256": "83387c217e109956af61a23884cf8cc9ba5f19241b3ac68141e3ad1153fc4597"
            },
            "downloads": -1,
            "filename": "HiYaPyCo-0.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "427a8b2c79297c626e41c34368745bff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 33358,
            "upload_time": "2024-10-20T04:14:00",
            "upload_time_iso_8601": "2024-10-20T04:14:00.309129Z",
            "url": "https://files.pythonhosted.org/packages/4a/4c/48999f3383f99a4bb49723983147b2b4ef62f29fdeca81ec87cb0cc70d8c/HiYaPyCo-0.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-20 04:14:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zerwes",
    "github_project": "hiyapyco",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "hiyapyco"
}
        
Elapsed time: 0.72846s