{ "info": { "author": "Thomas Alcorn", "author_email": "tdb.alcorn@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: System", "Topic :: Utilities" ], "description": "niceconf\n=======================\n\nniceconf is a dropin replacement for the stdlib RawConfigParser object. It makes\nparsing and using configuration files in your python scripts approximately\n10 times more pythonic and fun.\n\nBy default it reads and writes to ~/.conf. This can be changed by setting\n$CONF. If ~/.conf or the file specified in $CONF does not exist, it will be\ncreated on the first import.\n\n-----------------------\n\nbasic usage:\n >>> from niceconf import config\n >>> config\n gmail\n my-database\n secret-stuff\n >>> config['gmail']\n [gmail]\n username = rick@gmail.com\n password = wubalubadubdub\n >>> config['gmail']['username']\n 'rick@gmail.com'\n >>> config['gmail']['password']\n 'wubalubadubdub'\n\nadd or set config file options:\n >>> config['my-database']['port'] = 3306\n >>> config['my-database']['port']\n '3306'\n\ndelete config file options:\n >>> del config['secret-stuff']['burn-after-reading']\n >>> config['secret-stuff']['burn-after-reading']\n NoOptionError: No option 'burn-after-reading' in section: 'secret-stuff'\n\nadd a section (any valid dict-like can be added as section):\n >>> config['stackoverflow'] = {'username': 'guido',\n 'password': 'pa$$word1'}\n >>> config['stackoverflow']\n [stackoverflow]\n username = guido\n password = pa$$word1\n\ndelete a section:\n >>> del config['stackoverflow']\n >>> config['stackoverflow']\n NoSectionError: No section: 'stackoverflow'\n\nwrite out to a file (overwrites by default):\n >>> config.save()\n\nread in another config file:\n >>> config.read('/path/to/conf')\n ['/path/to/conf']\n >>> config\n gmail\n my-database\n secret-stuff\n first_section_of_other_conf\n second_section_of_other_conf\n\nexplode conf into function arguments\n >>> print_kwargs(**config['gmail'])\n {'username': 'rick@gmail.com', 'password': 'wubalubadubdub'}\n\n\nAdditionally, the config object _is_ an instance of RawConfigParser, so you can\nuse any of those methods as before. This means that config is a dropin\nreplacement for ConfigParser.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/tdb-alcorn/niceconf/tarball/0.1.2", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tdb-alcorn/niceconf", "keywords": "config configuration", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "niceconf", "package_url": "https://pypi.org/project/niceconf/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/niceconf/", "project_urls": { "Download": "https://github.com/tdb-alcorn/niceconf/tarball/0.1.2", "Homepage": "https://github.com/tdb-alcorn/niceconf" }, "release_url": "https://pypi.org/project/niceconf/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "A nice config package", "version": "0.1.2" }, "last_serial": 1800015, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "858c8765402c73621bc84da129a39a2e", "sha256": "a1370dc9966945e8a6fa8bf20a517e6eedf0ec253f44f2078802faaaab85e708" }, "downloads": -1, "filename": "niceconf-0.1.1.tar.gz", "has_sig": false, "md5_digest": "858c8765402c73621bc84da129a39a2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3396, "upload_time": "2015-11-03T04:39:16", "url": "https://files.pythonhosted.org/packages/fd/25/9c2e74cfd5314d4e447664119977b4538e6c6aa55d71a3742d40fc15593d/niceconf-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a37a76af0c8b6a2d15eb95e43e07d555", "sha256": "53660cc0d5ae852026b5d223a64f996e14421ca5153244515512ea50c7a5de52" }, "downloads": -1, "filename": "niceconf-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a37a76af0c8b6a2d15eb95e43e07d555", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3323, "upload_time": "2015-11-04T03:23:14", "url": "https://files.pythonhosted.org/packages/5d/36/af2058ab95ac8d63ad880a3ebae048277340771f240c270a1d577048e592/niceconf-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a37a76af0c8b6a2d15eb95e43e07d555", "sha256": "53660cc0d5ae852026b5d223a64f996e14421ca5153244515512ea50c7a5de52" }, "downloads": -1, "filename": "niceconf-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a37a76af0c8b6a2d15eb95e43e07d555", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3323, "upload_time": "2015-11-04T03:23:14", "url": "https://files.pythonhosted.org/packages/5d/36/af2058ab95ac8d63ad880a3ebae048277340771f240c270a1d577048e592/niceconf-0.1.2.tar.gz" } ] }