将旧hiera版本的ruby输出转换为等效的python或json数据结构
hip的Python项目详细描述
#时髦的[特拉维斯CI构建状态](https://travis-ci.org/marthjod/hipy.svg?branch=master)(https://travis ci.org/marthjod/hipy)
[![覆盖状态](https://workalls.io/repos/github/marthjod/hipy/badge.svg?branch=master)(https://coveralls.io/github/marthjod/hipy?BR/> BR/>将旧Hiera版本的Ruby输出转换为等效的Python或JSON数据结构。
使用< BR> > BASH
用法:HIPY [选项] BR/> BR/>将HIAL输出转换为JSON/Python。BR/> BR/>选项:
选项:版本显示和退出。
-JSON/Python格式输出为JSON/Python。G显示调试输出(主要来自语法分析器):帮助显示该消息并退出。
BR/>(默认:JSON)
——调试--python--debug
in:nil
<;名为“nil”的节点匹配“nil”>;
out:none
````
>有关更多示例(以及可能的限制),请参阅测试示例。
parser=hieraoutputparser(text='nil')
>;>>parser.get戡json()
'null'
>;>>parser.get戡python()不是
true
>;>parser=hieraoutputparser(text='nil',debug=true)
<;名为“nil”的节点匹配“nil”>;
```
## Tests
### tox
```
pip install tox
tox
```
### manually
```
pip install -r test-requirements.txt
nosetests -c nose.cfg
```
## Installation
### PyPI
`pip install hipy`
### Locally
Run `python setup.py install`.
### 【pex】(https://pex.readthedocs.io/)
`` bash
virtuallenv-venv
source-venv/bin/activat
pip-install hipy-pex
pex-r<;(pip-freeze)-c hipy-o hipy.pex
deactivate
mvhipy.pex/tmp
cd/tmp
echo'{“a”=>;a”=>;6};/hipy.pex-pythopython.pex-python-python-python-python
{u'a':6}
```
[![覆盖状态](https://workalls.io/repos/github/marthjod/hipy/badge.svg?branch=master)(https://coveralls.io/github/marthjod/hipy?BR/> BR/>将旧Hiera版本的Ruby输出转换为等效的Python或JSON数据结构。
使用< BR> > BASH
用法:HIPY [选项] BR/> BR/>将HIAL输出转换为JSON/Python。BR/> BR/>选项:
选项:版本显示和退出。
-JSON/Python格式输出为JSON/Python。G显示调试输出(主要来自语法分析器):帮助显示该消息并退出。
BR/>(默认:JSON)
——调试--python--debug
in:nil
<;名为“nil”的节点匹配“nil”>;
out:none
````
>有关更多示例(以及可能的限制),请参阅测试示例。
parser=hieraoutputparser(text='nil')
>;>>parser.get戡json()
'null'
>;>>parser.get戡python()不是
true
>;>parser=hieraoutputparser(text='nil',debug=true)
<;名为“nil”的节点匹配“nil”>;
```
## Tests
### tox
```
pip install tox
tox
```
### manually
```
pip install -r test-requirements.txt
nosetests -c nose.cfg
```
## Installation
### PyPI
`pip install hipy`
### Locally
Run `python setup.py install`.
### 【pex】(https://pex.readthedocs.io/)
`` bash
virtuallenv-venv
source-venv/bin/activat
pip-install hipy-pex
pex-r<;(pip-freeze)-c hipy-o hipy.pex
deactivate
mvhipy.pex/tmp
cd/tmp
echo'{“a”=>;a”=>;6};/hipy.pex-pythopython.pex-python-python-python-python
{u'a':6}
```