{ "info": { "author": "Ali Afshar", "author_email": "aafshar@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "sensibleconfig\n~~~~~~~~~~~~~~\n\nSo you have some configuration variables, and you want them to be available to\nbe in any number of ini-like files, as well as overridable from the environment,\nand overridable from the command line. Define once, and use.\n\n\n>>> options = [\n... Option('debug', 'Run in debug mode', False,\n... short_name='d', converter=bool, action='store_true'),\n... ]\n>>> conf = Config(options)\n>>> conf.debug # Will start as the default value\nFalse\n\nThis time we shall pass an env prefix to look up on, so as not to pollute any\nenvironment namespace too badly:\n\n>>> conf = Config(options, 'PONY')\n>>> conf.grab_from_env({'PONY_DEBUG': '1'})\n>>> conf.debug\nTrue\n\n.. note::\n The optional env dict parameter will default to os.environ if it is omitted.\n\nNow we can grab some stuff from argv:\n\n>>> conf = Config(options)\n>>> conf.grab_from_argv(['--debug'])\n[]\n>>> conf.debug\nTrue\n\nAlso, remember that you can serialize these things:\n\n>>> conf = Config(options)\n>>> conf.to_dict()\n{'debug': False}\n\n.. note::\n In real life you would import this::\n\n from sensibleconfig import Config, Option\n\nSo as you can see above, the options were declared, and then the config object\nwas created from those options. It is imagined that an application may collate\nthe options from many different places, such as plugins which wish to define\ntheir own options.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pidsoff.appspot.com/sensibleconfig", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "sensibleconfig", "package_url": "https://pypi.org/project/sensibleconfig/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sensibleconfig/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pidsoff.appspot.com/sensibleconfig" }, "release_url": "https://pypi.org/project/sensibleconfig/0.5/", "requires_dist": null, "requires_python": null, "summary": "Sensible way to grab config from various sources", "version": "0.5" }, "last_serial": 799409, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "1843d2fe960c6993ccab5f7a6af5c4ca", "sha256": "e96eaebac18d4ed055ac9d82331cc6d85a1f43f2a912a7b460902877dc23e2c7" }, "downloads": -1, "filename": "sensibleconfig-0.1.tar.gz", "has_sig": false, "md5_digest": "1843d2fe960c6993ccab5f7a6af5c4ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1167, "upload_time": "2009-04-01T13:56:56", "url": "https://files.pythonhosted.org/packages/5c/85/c5612a46fd811f35c5a0a7abb88cc8f59f52558b188a4e8b017c0e827bd6/sensibleconfig-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "adf65c7c50e3e738269b409bfdfb3357", "sha256": "40b11bba58a5d5a45f53cec775ce566bb5495c148deffd348806c6448d88b912" }, "downloads": -1, "filename": "sensibleconfig-0.2.tar.gz", "has_sig": false, "md5_digest": "adf65c7c50e3e738269b409bfdfb3357", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6954, "upload_time": "2009-04-01T14:04:08", "url": "https://files.pythonhosted.org/packages/3d/57/3147f98615ebeb75301a63882cffa8ba3123e01e72805d21e76d404df994/sensibleconfig-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "140771f16fa5adf80c84ec54e0b48ee5", "sha256": "b9134444a09302cf1141e1188e2b115481c8469dae870121c75b5378948ecf4f" }, "downloads": -1, "filename": "sensibleconfig-0.3.tar.gz", "has_sig": false, "md5_digest": "140771f16fa5adf80c84ec54e0b48ee5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6963, "upload_time": "2009-04-01T14:04:57", "url": "https://files.pythonhosted.org/packages/79/56/fe30ab503f4ccd8570b0aed369a82995099f2c10bd830c0b4ac85617454b/sensibleconfig-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "56cf55051ed685a2546030798ab7e080", "sha256": "a90793a0998b9059aa924eff00e5ef6d2b52fb0bf7d95d7a9c1ea1ac6d790823" }, "downloads": -1, "filename": "sensibleconfig-0.4.tar.gz", "has_sig": false, "md5_digest": "56cf55051ed685a2546030798ab7e080", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6965, "upload_time": "2009-04-01T14:06:30", "url": "https://files.pythonhosted.org/packages/dd/f4/8a7b2e7c88d79f26db5c0b179fa7b14a3c6d705e0fc09f49dd4db161ac37/sensibleconfig-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "584dbfd39d035d6c3fcfc1c22ad7728d", "sha256": "2faacf220a2d39e8bbd439805da6979a49e7273529f3e8059024180a2fe5eba9" }, "downloads": -1, "filename": "sensibleconfig-0.5.tar.gz", "has_sig": false, "md5_digest": "584dbfd39d035d6c3fcfc1c22ad7728d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7068, "upload_time": "2009-04-01T14:22:35", "url": "https://files.pythonhosted.org/packages/e3/e8/64159a667f6cedbf728722e81a814f234c09b449ff02ea98ac7b6f128f03/sensibleconfig-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "584dbfd39d035d6c3fcfc1c22ad7728d", "sha256": "2faacf220a2d39e8bbd439805da6979a49e7273529f3e8059024180a2fe5eba9" }, "downloads": -1, "filename": "sensibleconfig-0.5.tar.gz", "has_sig": false, "md5_digest": "584dbfd39d035d6c3fcfc1c22ad7728d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7068, "upload_time": "2009-04-01T14:22:35", "url": "https://files.pythonhosted.org/packages/e3/e8/64159a667f6cedbf728722e81a814f234c09b449ff02ea98ac7b6f128f03/sensibleconfig-0.5.tar.gz" } ] }