{ "info": { "author": "Marian Ignev", "author_email": "m@ignev.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Operating System :: POSIX", "Operating System :: POSIX :: BSD", "Operating System :: POSIX :: Linux", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: System :: Shells", "Topic :: Text Processing :: Markup :: XML", "Topic :: Utilities" ], "description": "Configo\n=======\n\n[![Build Status](https://travis-ci.org/mignev/configo.png?branch=master)](https://travis-ci.org/mignev/configo)\n\nEasy way to use existing JSON, XML or YAML config files from bash shell/scripts\n\n# How can i use it?\n...\n\n###Sample json config file\nLets say that this config file is located `/etc/myapp/config.json`\n\n {\n \"config_version\": \"1.0\",\n \"application\": \"My Application\",\n \"webservers\": {\n \"api\": {\n \"host\": \"api.some.com\",\n \"port\": \"80\",\n \"apikey\": \"somekey\",\n \"apisecret\": \"somesecret\"\n },\n\n \"img\": {\n \"host\": \"img.some.com\",\n \"port\": \"8013\",\n \"apikey\": \"ihuu\",\n \"apisecret\": \"somesecret\"\n },\n\n \"video\": {\n \"host\": \"video.some.com\",\n \"port\": \"80\",\n \"apikey\": \"somekey\",\n \"apisecret\": \"somesecret\"\n }\n },\n\n \"databases\": {\n \"web\": { \"host\": \"db.web.some.com\", \"port\": \"3306\", \"username\": \"myuser\", \"password\": \"mypass\" },\n \"office\": { \"host\": \"db.office.some.com\", \"port\": \"3306\", \"username\": \"myuser\", \"password\": \"mypass\" }\n }\n }\n\n#Usage examples\nThese examples will show you several different ways about how you can work with your JSON/YAML/XML config files in shell with ease.\nAll examples use the sample config file above.\n\n\n### Syntax\n 1. `configo from config get key`\n 2. `configo get key` //That's what i say 'lazy way' ... more info below\n\n### Shell example in standard way\n # configo from /etc/myapp/config.json get application\n //-> My Application\n\n### Shell example in standard way with `nested` properties\n # configo from /etc/myapp/config.json get webservers.api.host\n //-> api.some.com\n\n### Shell scripts example in standard way\n TARGET_CONF=\"/etc/myapp/config.json\";\n CONFIGO=\"configo from $TARGET_CONF\";\n VARNAME=`$CONFIGO get databases.office.password`;\n echo $VARNAME;\n //-> mypass\n\n### Lazy example\nIf 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.\n\n export CONFIGO_CONF=`/etc/myapp/config.json`\n\n API_WEBSERVER_HOSTNAME=`configo get webservers.api.host`\n //-> api.some.com\n\n OFFICE_DB_HOST=`configo get databases.office.host`\n //-> db.office.some.com\n\n#Requirements\n\n* Python 2.6+\n* PyYAML (latest version recommended) - tested with PyYAML 3.10\n\n# Installation\n\nfrom source\n\n # git clone git@github.com:mignev/configo.git\n # cd configo\n # python setup.py install\n\n\nwith pip\n\n # pip install configo\n\n# Testing\n\nAll 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`.\n\nSo what should we do to run tests:\n\n cd tests\n ln -s ../configo configo\n ln -s ../bin bin\n\nIf you want to run `configo api` tests just run:\n\n python configo_tests.py\n\nIf you run `command line tool` tests you must do the following:\n\n export CONFIGO_CONF=`pwd`/fixtures/config.json # this is necessary to work tests with lazy syntax\n\n... and after that just run:\n\n python configo_executable_tests.py\n\n\n# Contributing\nFork the [Configo repo on GitHub](https://github.com/mignev/configo), make your super duper awesome changes :) and send me a Pull Request. :)\n\n\n\n# TODO\n- Add xml support\n- Change/Update properties in config files\n\n# CHANGELOG\n\n### 1.2:\n\n- add yaml support\n- add tests for yaml support\n- small refactoring\n\n### 1.1:\n\n- add tests for api and command line tool\n- refactor configo api and command line tool\n\n#Copyright\nCopyright (c) 2012 Marian Ignev. See LICENSE for further details.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://m.ignev.net/code/configo", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "Configo", "package_url": "https://pypi.org/project/Configo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Configo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://m.ignev.net/code/configo" }, "release_url": "https://pypi.org/project/Configo/1.4/", "requires_dist": null, "requires_python": null, "summary": "Easy way to use existing JSON, XML or YAML config files from bash shell/scripts", "version": "1.4" }, "last_serial": 2203283, "releases": { "1.0": [ { "comment_text": "built for Darwin-12.2.0", "digests": { "md5": "2750a5373bfeb592709d0675c46690b7", "sha256": "eaa9bdb084293b52770a238325301ed54407c5436a93d554bb9243f5945817b1" }, "downloads": -1, "filename": "Configo-1.0.macosx-10.7-x86_64.tar.gz", "has_sig": false, "md5_digest": "2750a5373bfeb592709d0675c46690b7", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 2907, "upload_time": "2012-11-18T21:24:11", "url": "https://files.pythonhosted.org/packages/19/0e/76c645b96a96c346eca8bc6e11cdb85cfa16e70d3649cae08ac6a116e6a2/Configo-1.0.macosx-10.7-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "49a358a69363e853835b7383deb52560", "sha256": "84fa36c6ba90b3578f775c958778ccdd01fc9b389c3b03f67ba70d082298e8c6" }, "downloads": -1, "filename": "Configo-1.0.tar.gz", "has_sig": false, "md5_digest": "49a358a69363e853835b7383deb52560", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1909, "upload_time": "2012-11-18T21:23:59", "url": "https://files.pythonhosted.org/packages/22/31/45ba7384ed608bff89ac23d39978cc47cb9e7136c3bcd6f76cf1a28d5eaf/Configo-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "c668d510bd45bd455d8ad9eaece3a7f9", "sha256": "dab1e54073d5d6c3a915d81e2f90fab958df9d78cd378ac63ad74e9e4a4f2cf4" }, "downloads": -1, "filename": "Configo-1.1.tar.gz", "has_sig": false, "md5_digest": "c668d510bd45bd455d8ad9eaece3a7f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3405, "upload_time": "2012-11-19T15:17:27", "url": "https://files.pythonhosted.org/packages/58/91/4ccf33af4639dc3d401697165180d6952bfc7acc480a05e641c91763c317/Configo-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "e3dd5f1dbe79455d759db9ea6f2a3bbf", "sha256": "5c31234b260f406e65f69b1457e391b5c979e0f985d8e88b9b8c18cd32d43130" }, "downloads": -1, "filename": "Configo-1.2.tar.gz", "has_sig": false, "md5_digest": "e3dd5f1dbe79455d759db9ea6f2a3bbf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3947, "upload_time": "2012-11-26T16:10:24", "url": "https://files.pythonhosted.org/packages/e4/e7/dce8a0254475bbd817caa071ea235c6d917448660582f135ab40cd13b1f8/Configo-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "f5da0a7a2f2418845dd2333dfb76d5ed", "sha256": "d050d26d0679f21dd7f1bc383a387efe7b2bc133b64205376632b9f6e03f5c53" }, "downloads": -1, "filename": "Configo-1.3.tar.gz", "has_sig": false, "md5_digest": "f5da0a7a2f2418845dd2333dfb76d5ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4138, "upload_time": "2016-07-05T12:11:23", "url": "https://files.pythonhosted.org/packages/9b/ed/8b1786349020de54ac4e3786645a9fe3ba10d2707d12b464b1437f1453ff/Configo-1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "b2246a644cdfc83157eff622d2671cff", "sha256": "bc053ffc0cf32f6561d3c3f71bbbe843907163f15b525dffd867e6b8ad7c2bb2" }, "downloads": -1, "filename": "Configo-1.4.tar.gz", "has_sig": false, "md5_digest": "b2246a644cdfc83157eff622d2671cff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4660, "upload_time": "2016-07-05T12:22:35", "url": "https://files.pythonhosted.org/packages/55/69/b6e296c4338b8c6e213d6a0590e148f18d8056bab5195a890284fd6f2a99/Configo-1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b2246a644cdfc83157eff622d2671cff", "sha256": "bc053ffc0cf32f6561d3c3f71bbbe843907163f15b525dffd867e6b8ad7c2bb2" }, "downloads": -1, "filename": "Configo-1.4.tar.gz", "has_sig": false, "md5_digest": "b2246a644cdfc83157eff622d2671cff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4660, "upload_time": "2016-07-05T12:22:35", "url": "https://files.pythonhosted.org/packages/55/69/b6e296c4338b8c6e213d6a0590e148f18d8056bab5195a890284fd6f2a99/Configo-1.4.tar.gz" } ] }