{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries" ], "description": ".. image:: https://travis-ci.org/datakortet/dkconfig.svg?branch=master\r\n :target: https://travis-ci.org/datakortet/dkconfig\r\n\r\n.. image:: https://readthedocs.org/projects/dkconfig/badge/?version=latest\r\n :target: https://readthedocs.org/projects/dkconfig/?badge=latest\r\n :alt: Documentation Status\r\n\r\n\r\n.. image:: https://coveralls.io/repos/datakortet/dkconfig/badge.png\r\n :target: https://coveralls.io/r/datakortet/dkconfig\r\n :alt: Coverage Status\r\n\r\n\r\ndkconfig -- command line access to ConfigParser\r\n==================================================\r\n\r\n\r\nInstalling from PyPI\r\n--------------------\r\n\r\n\r\n pip install dkconfig\r\n\r\n\r\nBasic usage\r\n-----------\r\nMost of the methods of ConfigParser\r\n(https://docs.python.org/2/library/configparser.html#ConfigParser.RawConfigParser)\r\nshould be usable in a relatively obvious way, however, ``dkconfig`` tries to\r\ngive you some sane defaults to make your life easier, e.g. it will create\r\nfiles/headers/keys that don't exist::\r\n\r\n /tst> ll\r\n /tst> dkconfig foo.ini set header key value\r\n /tst> cat foo.ini\r\n [header]\r\n key = value\r\n\r\nSections can be added::\r\n\r\n /tst> dkconfig foo.ini add_section header2\r\n /tst> cat foo.ini\r\n [header]\r\n key = value\r\n\r\n [header2]\r\n\r\nre-adding them is a no-op (and doesn't throw an exception)::\r\n\r\n /tst> dkconfig foo.ini add_section header2\r\n /tst> cat foo.ini\r\n [header]\r\n key = value\r\n\r\n [header2]\r\n\r\nthe values command pretty prints the keys and values::\r\n\r\n /tst> dkconfig foo.ini values\r\n key => value\r\n\r\nthe ``dos`` command will output the key/values as dos ``set`` commands::\r\n\r\n /tst> dkconfig foo.ini dos\r\n set \"KEY=value\"\r\n\r\nfrom a batch file you would use it like this::\r\n\r\n dkconfig foo.ini dos > tmp.bat && call tmp.bat && del tmp.bat\r\n\r\nthe ``bash`` command does the same for bash, and you'll use it together with\r\neval::\r\n\r\n eval $(dkconfig foo.ini bash)\r\n\r\nYou can read values directly into dos variables in the regular way::\r\n\r\n > for /f \"delims=\" %a in ('dkconfig foo.ini get header key') do @set KEY=%a\r\n > echo %KEY%\r\n value\r\n\r\nBash has a more sane syntax for this::\r\n\r\n bash$ export KEY=$(dkconfig foo.ini get header key)\r\n bash$ echo $KEY\r\n value\r\n\r\nThe appropriate error returns are set if a key is missing::\r\n\r\n /tst> dkconfig foo.ini get header missing\r\n /tst> echo %ERRORLEVEL%\r\n 1\r\n\r\n /tst> dkconfig foo.ini get header key\r\n value\r\n /tst> echo %ERRORLEVEL%\r\n 0\r\n\r\n\r\n\r\n", "description_content_type": null, "docs_url": "https://pythonhosted.org/dkconfig/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/datakortet/dkconfig", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "dkconfig", "package_url": "https://pypi.org/project/dkconfig/", "platform": "", "project_url": "https://pypi.org/project/dkconfig/", "project_urls": { "Homepage": "https://github.com/datakortet/dkconfig" }, "release_url": "https://pypi.org/project/dkconfig/0.2.0/", "requires_dist": [ "lockfile (>=0.10.2)" ], "requires_python": "", "summary": "dkconfig - command line access to ConfigParser", "version": "0.2.0" }, "last_serial": 3411628, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1f75ae36be175bbd30c2a9d98a865e68", "sha256": "649966eece1165f9c35c3cc4c0961a9c677608551b99aee7e168747b7484003e" }, "downloads": -1, "filename": "dkconfig-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1f75ae36be175bbd30c2a9d98a865e68", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5848, "upload_time": "2014-11-30T01:37:17", "url": "https://files.pythonhosted.org/packages/57/77/d78e98fec011761abb47d2cee1a53925a5368631cadfd54afbb49f344253/dkconfig-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eb405b13781dd2c8dfe9a036f12971a9", "sha256": "17620bf68ce5674b9f63f2a8fba065faa3a1674565e29fdf01bbf1d946775874" }, "downloads": -1, "filename": "dkconfig-0.1.0.win32.exe", "has_sig": false, "md5_digest": "eb405b13781dd2c8dfe9a036f12971a9", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 238971, "upload_time": "2014-11-30T01:37:09", "url": "https://files.pythonhosted.org/packages/65/e8/6b4e43d01740e5f1414a54c4a300af71ab30812d3f559882fd44d795babe/dkconfig-0.1.0.win32.exe" }, { "comment_text": "", "digests": { "md5": "1e7d19569cd366b0ba92bf8b26450db2", "sha256": "77e9687293bc21cc9a58b8199903a9fbec0370331504c3008b4d637e29f5e22d" }, "downloads": -1, "filename": "dkconfig-0.1.0.zip", "has_sig": false, "md5_digest": "1e7d19569cd366b0ba92bf8b26450db2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7107, "upload_time": "2014-11-30T01:37:03", "url": "https://files.pythonhosted.org/packages/4d/ec/3718d410fd6517799b2cd1ee64b6fe7762ea723a07281ebbe3890baf607b/dkconfig-0.1.0.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "1b4e16ef9431af6a7cfde993e62a2599", "sha256": "b1ab89d91b397db460cb8a58a179b772c109f32b3f3de651cafd9b9db329b106" }, "downloads": -1, "filename": "dkconfig-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1b4e16ef9431af6a7cfde993e62a2599", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6097, "upload_time": "2014-11-30T15:59:18", "url": "https://files.pythonhosted.org/packages/50/6f/54db43a87d4bb03081b9400cb82bb49c5e1a41d239c134d06ab0b83fd039/dkconfig-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d565a80e6f1ec993ceab681f8c21ee22", "sha256": "8a67d61899eab91c3ee1f86217928055c4ebe22b302ee19598435b295927228d" }, "downloads": -1, "filename": "dkconfig-0.1.2.win32.exe", "has_sig": false, "md5_digest": "d565a80e6f1ec993ceab681f8c21ee22", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 239326, "upload_time": "2014-11-30T15:59:15", "url": "https://files.pythonhosted.org/packages/82/5c/6480fe44394aa8d26b78e4b11fcab394a3f295024e8bb2544c907f2d8676/dkconfig-0.1.2.win32.exe" }, { "comment_text": "", "digests": { "md5": "183239ffc922b527406d0ed3d74a6195", "sha256": "1f6936079d0355c7dc8722ad8f7c18da411bea1c18269713966902920168b0fd" }, "downloads": -1, "filename": "dkconfig-0.1.2.zip", "has_sig": false, "md5_digest": "183239ffc922b527406d0ed3d74a6195", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7417, "upload_time": "2014-11-30T15:59:11", "url": "https://files.pythonhosted.org/packages/9e/f7/1e1ec80bdce3fef30b00defb6d81cb3544c5d8eb32d4810800f2e95a9261/dkconfig-0.1.2.zip" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "e161e803ca165018369ab2a720c9c104", "sha256": "c0cf9668a00707f95f8100ad91c20521f0dd54ea6d83fd4bcd2a58d8360d65aa" }, "downloads": -1, "filename": "dkconfig-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e161e803ca165018369ab2a720c9c104", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6328, "upload_time": "2014-12-04T04:39:07", "url": "https://files.pythonhosted.org/packages/a4/c8/d7c738c2c7636fadad0ba99aafc22dabd29ccc527ca68d6d19e2567c7181/dkconfig-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "94dc69e298dcfe8be64183c07ee2ecd4", "sha256": "71f77dac5ed4c0f5fdde540a80650b0107033fd2cacdc51fbf218924895afe8c" }, "downloads": -1, "filename": "dkconfig-0.1.4.win32.exe", "has_sig": false, "md5_digest": "94dc69e298dcfe8be64183c07ee2ecd4", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 239536, "upload_time": "2014-12-04T04:39:04", "url": "https://files.pythonhosted.org/packages/dc/d2/f6d40074db13c627fe9e7962aa554537a2c8a47b0033b2e5140689e109b4/dkconfig-0.1.4.win32.exe" }, { "comment_text": "", "digests": { "md5": "473d710d4bc06d646bf10a92679a6081", "sha256": "e348a58d53375eabd1b665205924b9f521f86648ba791c6f1b09a841c23dd9bc" }, "downloads": -1, "filename": "dkconfig-0.1.4.zip", "has_sig": false, "md5_digest": "473d710d4bc06d646bf10a92679a6081", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7641, "upload_time": "2014-12-04T04:39:02", "url": "https://files.pythonhosted.org/packages/44/60/ba4858f084b8d23a7833e7fab6932900a2791c118922224dd8e808a5ab4d/dkconfig-0.1.4.zip" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "ab1ef74ae113d5af3ceedadf451ab3cf", "sha256": "2db3694c012d830afb45711b2a6d313ce5f253b21cc066dd436e90d7883177ad" }, "downloads": -1, "filename": "dkconfig-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ab1ef74ae113d5af3ceedadf451ab3cf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9305, "upload_time": "2017-12-13T00:10:53", "url": "https://files.pythonhosted.org/packages/c1/59/acd4c2c13c7eefbb3b0f66dad1f8df05debd1ad382b457cce22df11c9dac/dkconfig-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eacbe286facbf8d2ddff524b60f0f2f6", "sha256": "a79944f00228cb8c813596da23e8823a93bb07d855b3b146efe2d53681a26243" }, "downloads": -1, "filename": "dkconfig-0.2.0.tar.gz", "has_sig": false, "md5_digest": "eacbe286facbf8d2ddff524b60f0f2f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5942, "upload_time": "2017-12-13T00:10:55", "url": "https://files.pythonhosted.org/packages/a1/06/1f961dec94151acba42f7f95bea0aa64001870c4f11e0908d8706283ceb0/dkconfig-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ab1ef74ae113d5af3ceedadf451ab3cf", "sha256": "2db3694c012d830afb45711b2a6d313ce5f253b21cc066dd436e90d7883177ad" }, "downloads": -1, "filename": "dkconfig-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ab1ef74ae113d5af3ceedadf451ab3cf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9305, "upload_time": "2017-12-13T00:10:53", "url": "https://files.pythonhosted.org/packages/c1/59/acd4c2c13c7eefbb3b0f66dad1f8df05debd1ad382b457cce22df11c9dac/dkconfig-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eacbe286facbf8d2ddff524b60f0f2f6", "sha256": "a79944f00228cb8c813596da23e8823a93bb07d855b3b146efe2d53681a26243" }, "downloads": -1, "filename": "dkconfig-0.2.0.tar.gz", "has_sig": false, "md5_digest": "eacbe286facbf8d2ddff524b60f0f2f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5942, "upload_time": "2017-12-13T00:10:55", "url": "https://files.pythonhosted.org/packages/a1/06/1f961dec94151acba42f7f95bea0aa64001870c4f11e0908d8706283ceb0/dkconfig-0.2.0.tar.gz" } ] }