Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Easy way to use existing JSON, XML or YAML config files from bash shell/scripts

Project Description

[![Build Status](](

Easy way to use existing JSON, XML or YAML config files from bash shell/scripts

# How can i use it?

###Sample json config file
Lets say that this config file is located `/etc/myapp/config.json`

"config_version": "1.0",
"application": "My Application",
"webservers": {
"api": {
"host": "",
"port": "80",
"apikey": "somekey",
"apisecret": "somesecret"

"img": {
"host": "",
"port": "8013",
"apikey": "ihuu",
"apisecret": "somesecret"

"video": {
"host": "",
"port": "80",
"apikey": "somekey",
"apisecret": "somesecret"

"databases": {
"web": { "host": "", "port": "3306", "username": "myuser", "password": "mypass" },
"office": { "host": "", "port": "3306", "username": "myuser", "password": "mypass" }

#Usage examples
These examples will show you several different ways about how you can work with your JSON/YAML/XML config files in shell with ease.
All examples use the sample config file above.

### Syntax
1. `configo from config get key`
2. `configo get key` //That's what i say 'lazy way' ... more info below

### Shell example in standard way
# configo from /etc/myapp/config.json get application
//-> My Application

### Shell example in standard way with `nested` properties
# configo from /etc/myapp/config.json get

### Shell scripts example in standard way
CONFIGO="configo from $TARGET_CONF";
echo $VARNAME;
//-> mypass

### Lazy example
If you want you can assign the path to your config file to `CONFIGO_CONF` variable and `configo` will use it without having to define it as an argument every time.

export CONFIGO_CONF=`/etc/myapp/config.json`


OFFICE_DB_HOST=`configo get`


* Python 2.6+
* PyYAML (latest version recommended) - tested with PyYAML 3.10

# Installation

from source

# git clone
# cd configo
# python install

with pip

# pip install configo

# Testing

All tests are located in `tests` dir. They are 2 different test suites. One test suit for `configo api` and another for the `command line tool`.

So what should we do to run tests:

cd tests
ln -s ../configo configo
ln -s ../bin bin

If you want to run `configo api` tests just run:


If you run `command line tool` tests you must do the following:

export CONFIGO_CONF=`pwd`/fixtures/config.json # this is necessary to work tests with lazy syntax

... and after that just run:


# Contributing
Fork the [Configo repo on GitHub](, make your super duper awesome changes :) and send me a Pull Request. :)

- Add xml support
- Change/Update properties in config files


### 1.2:

- add yaml support
- add tests for yaml support
- small refactoring

### 1.1:

- add tests for api and command line tool
- refactor configo api and command line tool

Copyright (c) 2012 Marian Ignev. See LICENSE for further details.
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Configo-1.4.tar.gz (4.7 kB) Copy SHA256 Checksum SHA256 Source Jul 5, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting