{ "info": { "author": "Pictage", "author_email": "dev@pictage.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Topic :: Utilities" ], "description": "ConfigIt\n========\n\n.. image:: https://secure.travis-ci.org/pictage/ConfigIt.png?branch=develop\n\nConfigIt is MIT Licensed Python Configuration library brought to you\nby the camera shy people at `Pictage `_.\n\nPython is all about the dicts so why do we settle for `INIs `_?\n\n\nFeatures\n--------\n\nAll configuration files are native python files.\n\nUsing ConfigIt you can read those files in as a module, or file\nand return a dictionary with attribute access.\n\nOne of the most powerful things about configit is its ability to use other\nconfigurations within a configuration.\n\n\nInstallation\n------------\n\nTo install configit, simply: ::\n\n $ pip install configit\n\n\nAPI Documentation\n-----------------\n\nconfigit.conf_from_file(filepath)\n Reads a string file path and returns a ConfigDict. \n\n::\n\n filepath = r'tests/configs/default.py'\n\n config = conf_from_file(filepath)\n assert config.config_dict.name == 'default'\n\n\n\nconfigit.conf_from_module(module)\n Reads an imported module and returns a ConfigDict.\n\n::\n\n import tests.configs.module_config\n\n config = conf_from_module(tests.configs.module_config)\n assert config.config_dict.name == 'module_config'\n\n\nconfigit.conf_from_dict(conf_dict)\n Reads a dictionary and returns a ConfigDict.\n\n ConfigDicts are accessible by attributes as well as keys.\n\n::\n\n config = dict(answer=42)\n\n config = configit.conf_from_dict(config)\n assert config.answer == 42\n\n\nconfigit.use(conf_source)\n Within a python configuration you can import another python configuration.\n The imported configuration will update local name space of the importing configuration.\n This means values in sub configuration will be accessible in the local configuration.\n\n This can be useful for boiler plate configurations where you only need a few items changed.\n\n **file_supplement.py** contents: ::\n\n answer=42\n\n **file.py** contents: ::\n\n import configit\n configit.use('file_supplement.py')\n\n **Code** using configit to get the configuration: ::\n\n import configit\n config = conf_from_file('file.py')\n\n assert config.answer == 42\n\n **Order matters!**\n\n **file_supplement.py** contents: ::\n\n answer=42\n\n **file.py** contents: ::\n\n import configit\n configit.use('file_supplement.py')\n answer=5\n\n **Code** using configit to get the configuration: ::\n\n import configit\n config = conf_from_file('file.py')\n\n assert config.answer == 5\n\n\n**For further examples refer to included tests.**\n\n\nContribute\n----------\n\n#. Fork `the repository `_ on Github to start making your changes to the **develop** branch (or branch off of it).\n#. Install to your env or venv by running: ::\n\n $ python setup.py develop\n\n#. Hack-a-thon, dance party!\n#. Write a test which shows that the bug was fixed or that the feature works as expected.\n#. Test by running: ::\n\n $ python setup.py test\n\n#. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to `AUTHORS `_.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pictage/ConfigIt", "keywords": "configuration", "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "ConfigIt", "package_url": "https://pypi.org/project/ConfigIt/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ConfigIt/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/pictage/ConfigIt" }, "release_url": "https://pypi.org/project/ConfigIt/1.1/", "requires_dist": null, "requires_python": null, "summary": "Python Configurations", "version": "1.1" }, "last_serial": 806194, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "c36ac0624f370ef357a283f468bd518a", "sha256": "34dc30705b67d1dcc3d21339a082cd9ba2559901f497ddad3cea892709758fd8" }, "downloads": -1, "filename": "ConfigIt-0.1.2.tar.gz", "has_sig": false, "md5_digest": "c36ac0624f370ef357a283f468bd518a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5152, "upload_time": "2012-09-07T04:31:35", "url": "https://files.pythonhosted.org/packages/b4/34/a83d90c9834875384c415eab7f9556429b3dff55c7e70bba7b6f8938e91b/ConfigIt-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "c71e4ad196a0a7cdae4b946460925c70", "sha256": "6aeb7aa5a133b1504433bb388dacb7bc0bc58c278eda032cf365ab769108d3a3" }, "downloads": -1, "filename": "ConfigIt-0.1.3.tar.gz", "has_sig": false, "md5_digest": "c71e4ad196a0a7cdae4b946460925c70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4040, "upload_time": "2013-07-02T12:59:02", "url": "https://files.pythonhosted.org/packages/20/49/6f71fbd30efe83ea1d53904738c5c3527b5f26e765352af403d3a71bf6f3/ConfigIt-0.1.3.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "36aa703970aa1577042610781626f605", "sha256": "48ae1a95d8cb26e97e395280e233726090e45a1c59a3851e7a96c7f93ce19662" }, "downloads": -1, "filename": "ConfigIt-1.0.tar.gz", "has_sig": false, "md5_digest": "36aa703970aa1577042610781626f605", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2515, "upload_time": "2012-08-02T03:29:09", "url": "https://files.pythonhosted.org/packages/a2/bf/0fccff9167e1d8cdfeed5a6d23f05827ed9010622c28f741a7d0103ae9f5/ConfigIt-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "154efdca55fd8bb73c575594d857353a", "sha256": "a4e00afe7fba28364c325cd76bf5f125f7c4de1eb566cb785adaa6b3a3cc28bc" }, "downloads": -1, "filename": "ConfigIt-1.1.tar.gz", "has_sig": false, "md5_digest": "154efdca55fd8bb73c575594d857353a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5113, "upload_time": "2012-08-08T04:00:19", "url": "https://files.pythonhosted.org/packages/b1/2c/ed3cd243b4e940d9b147388d19b80966764ff400470967f5ab469c5dae95/ConfigIt-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "154efdca55fd8bb73c575594d857353a", "sha256": "a4e00afe7fba28364c325cd76bf5f125f7c4de1eb566cb785adaa6b3a3cc28bc" }, "downloads": -1, "filename": "ConfigIt-1.1.tar.gz", "has_sig": false, "md5_digest": "154efdca55fd8bb73c575594d857353a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5113, "upload_time": "2012-08-08T04:00:19", "url": "https://files.pythonhosted.org/packages/b1/2c/ed3cd243b4e940d9b147388d19b80966764ff400470967f5ab469c5dae95/ConfigIt-1.1.tar.gz" } ] }