hipy 0.12

Creator: bradpython12

Last updated:

Add to Cart

Description:

hipy 0.12

# hipy[![Travis CI Build Status](https://travis-ci.org/marthjod/hipy.svg?branch=master)](https://travis-ci.org/marthjod/hipy)[![Coverage Status](https://coveralls.io/repos/github/marthjod/hipy/badge.svg?branch=master)](https://coveralls.io/github/marthjod/hipy?branch=master)Convert Ruby output of older Hiera versions to equivalent Python or JSON data structures.## Usage```bashUsage: hipy [OPTIONS] Convert Hiera output to JSON/PythonOptions: --version Show the version and exit. --json / --python Format output as JSON/Python (default: JSON) --debug Show debug output (mainly from parser) --help Show this message and exit.```## Examples### Standalone CLI script```bashechonil|hipynull echo nil | hipy --jsonnullechonil|hipy−−pythonNone echo nil | hipy --python --debugIn: nil<Node called "nil" matching "nil">Out: None```For more examples (and possible limitations), cf. the test examples.### Library```python>>> from hipy.parser import HieraOutputParser>>> parser = HieraOutputParser(text='nil')>>> parser.get_json()'null'>>> parser.get_python() is NoneTrue>>> parser = HieraOutputParser(text='nil', debug=True)<Node called "nil" matching "nil">```## Tests### tox```pip install toxtox```### manually```pip install -r test-requirements.txtnosetests -c nose.cfg```## Installation### PyPI`pip install hipy`### LocallyRun `python setup.py install`.### [PEX](https://pex.readthedocs.io/)```bashvirtualenv venvsource venv/bin/activatepip install hipy pexpex -r <(pip freeze) -c hipy -o hipy.pexdeactivatemv hipy.pex /tmpcd /tmpecho '{"a"=>6}' | ./hipy.pex --python{u'a': 6}```

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.