{ "info": { "author": "Alfredo Deza", "author_email": "alfredodeza [at] gmail [dot] com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Build Tools" ], "description": "When projects start to grow, the need for a globally accessible configuration\nmanager is obvious.\n\nHaving configurations mapped to dictionaries is really useful, but can create a \nproblem with memory.\n\n**Guachi** not only holds persistent dictionaries on disk, but it also maps \nINI style keys to dictioanry keys, and can fill in the default values if some \nof them are missing.\n\nYou do not need to know anything about how **guachi** stores the values, just \ntreat it like a regular dictionary!\n\nUser Interaction\n------------------\nLet's assume you are dealing with a Twitter application that uses a ``ini`` file.\nThis is a sampla INI file and how it looks::\n\n [DEFAULT]\n \n app.twitter.username = alfredodeza\n app.update.frequency = 60\n app.load.startup = False\n\nWe have a username, a frequency and a different setting for the startup option.\n\nLets deal with that::\n\n ini_file = ``/Users/alfredo/.twwiter.ini``\n conf = ConfigMapper(config_db_path)\n conf.set_config(ini_file)\n\nThat's it! At this point, **guachi** has parsed the config file and stored the values.\n\nLets query them calling our keys::\n\n >>> db_conf = conf.stored_config()\n >>> db_conf['frequency']\n 60 \n\nGreat, we now are making sure we have our data. We can actually get that value from anywhere \nin our twitter app by calling it this way::\n\n db = ConfigMapper(config_db_path)\n conf = db.stored_config()\n\n frequency = conf['frequency']\n\n\nGetting Deafults\n---------------------\nAbove we inspected an INI file with some changed values. But what happens when the user \nhas none?\n\nSince we set our defaults, we can be sure they are right there in case our app needs \nit in some sub-module::\n\n >>> db = ConfigMapper(config_db_path)\n >>> conf = db.stored_config()\n >>> conf['load']\n True\n\nUpdating Values \n-----------------\nWhat if a user makes changes? We can always save and update what we read from the INI \nfile at load time, to make sure we have the latest changes from the user::\n\n conf = ConfigMapper(config_db_path)\n conf.update_config(ini_file)\n\nDocumentation\n=============\nOur full Documentation is hosted here. Go take a look for the full API.\n\nhttp://guachi.googlecode.com/hg/docs/build/html/index.html", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://code.google.com/p/guachi", "keywords": "configuration management persistent dictionaries dictionary parse map mapping", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "guachi", "package_url": "https://pypi.org/project/guachi/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/guachi/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://code.google.com/p/guachi" }, "release_url": "https://pypi.org/project/guachi/0.0.6/", "requires_dist": null, "requires_python": null, "summary": "Global, persistent configurations as dictionaries", "version": "0.0.6" }, "last_serial": 792759, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "addc6af6bce11f1235ca5c1b41f1d6e6", "sha256": "e2ec89353b3d7726406267906f85414978ebe94849c0d765094a4347eba6832e" }, "downloads": -1, "filename": "guachi-0.0.1.tar.gz", "has_sig": false, "md5_digest": "addc6af6bce11f1235ca5c1b41f1d6e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11447, "upload_time": "2010-09-20T04:56:25", "url": "https://files.pythonhosted.org/packages/9f/c2/cc38c246fb4b40b7db0cced859efae84125340a5ce67e2968c08631d5af2/guachi-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "a52fb9573720733238100a5abcd811ab", "sha256": "6d8b2c4777d02ace4a3a08d3ad6edd95a83cb2c1120866bc1750d370895e5a58" }, "downloads": -1, "filename": "guachi-0.0.2.tar.gz", "has_sig": false, "md5_digest": "a52fb9573720733238100a5abcd811ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11948, "upload_time": "2010-09-23T03:00:53", "url": "https://files.pythonhosted.org/packages/c2/4f/342e14ce07c57ce7f582203f5e6062fd9d284965c71cdbc8c760a1731179/guachi-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "31d82e3dd026cba67593a5e2d3fe5639", "sha256": "3efa7b4f58b3a08c3e012d8f8174b48b8dfc37c27d75b7d84ef5ec613175523e" }, "downloads": -1, "filename": "guachi-0.0.3.tar.gz", "has_sig": false, "md5_digest": "31d82e3dd026cba67593a5e2d3fe5639", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11954, "upload_time": "2010-09-24T02:40:08", "url": "https://files.pythonhosted.org/packages/00/c3/96b4d21b3555580139a4791efd80dd7cc71e33bb4177d1af885f9eaf50c5/guachi-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "81e2e1e9d0c8ea278a1f1106ff66e768", "sha256": "f617dfb3d1e9b2d12629f9f72d08ac8947880a799b87b2d370ebc5f7ddba7c44" }, "downloads": -1, "filename": "guachi-0.0.4.tar.gz", "has_sig": false, "md5_digest": "81e2e1e9d0c8ea278a1f1106ff66e768", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11964, "upload_time": "2010-09-25T15:40:03", "url": "https://files.pythonhosted.org/packages/5e/27/81e76d1e322bbd0d975f995cb1c383642dbc3b0d891a5a33acb87a04e150/guachi-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "1f5709568fbf0ccb2a0da4aeb3c84cdb", "sha256": "6ca6d9c6575a1edbca0fd1ba6811e554d3f4f544488cb532c344ae8ea2fe6161" }, "downloads": -1, "filename": "guachi-0.0.5.tar.gz", "has_sig": false, "md5_digest": "1f5709568fbf0ccb2a0da4aeb3c84cdb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11993, "upload_time": "2010-10-03T14:55:32", "url": "https://files.pythonhosted.org/packages/dc/a6/070df71d6ddeacb9625077b054d1f5fce17299d8493b9bb36a767a33add9/guachi-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "15c17f52dac6d34b5da416474979b4ef", "sha256": "a77cbb09417bd09f2d989fedbc0a0a759f8aee1cb1731a89a816218f44e0e4fb" }, "downloads": -1, "filename": "guachi-0.0.6.tar.gz", "has_sig": false, "md5_digest": "15c17f52dac6d34b5da416474979b4ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18014, "upload_time": "2011-01-04T02:04:44", "url": "https://files.pythonhosted.org/packages/fc/1b/ff14ec04338cbf5558e1bd1f639ece257f69e6ef08a758c9072026f49852/guachi-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "15c17f52dac6d34b5da416474979b4ef", "sha256": "a77cbb09417bd09f2d989fedbc0a0a759f8aee1cb1731a89a816218f44e0e4fb" }, "downloads": -1, "filename": "guachi-0.0.6.tar.gz", "has_sig": false, "md5_digest": "15c17f52dac6d34b5da416474979b4ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18014, "upload_time": "2011-01-04T02:04:44", "url": "https://files.pythonhosted.org/packages/fc/1b/ff14ec04338cbf5558e1bd1f639ece257f69e6ef08a758c9072026f49852/guachi-0.0.6.tar.gz" } ] }