When it's hard to parse it, BossConf it!
- config library for python application
- CLI tool
- for installation you need to run pip install bossconf.
- python 2.6.6 up to 2.7.x version.
- bossconf /path/to/file "level1, level2" - this command will access the level you want form file
-
cat example.json | bossconf "level1, level2" - this command will read and parse data from file and outputs the content.
-
echo '{"key":"value"}' | bossconf 'key' - this command will parse the string containing data for parsing and display the content.
-
curl curl -u user:password 'http://your/url/' | bossconf
- given the following files you can have:
-
bossconf example.yaml "anne, has"
and the output will be: -
bossconf example.json "anne, marry"
and the output: -
cat example.json "anne, has"
the output will be: -
echo '{"anne":{"has":"apples","marry":["has pears"]}}' | bossconf "anne, marry"
and the output: -
curl -u guest:rate 'http://example.com/api/queues' | bossconf
will output: -
curl -u guest:rate 'http://example.com/api/queues' | bossconf '0, back'
will display:
- you just need to import the moduel and create a new instance.
- the next step is to use
.get()
function and print the output. - we will use the same two file form the CLI example.