{ "info": { "author": "Oisin Mulvihill", "author_email": "oisin dot mulvihill a-t gmail d-ot com", "bugtrack_url": null, "classifiers": [], "description": "The boacontructor is a templating library for *data*.\n\nIt allows you to construct Python dictionaries from other templates,\ndictionaries or instances.\n\n\nSource code is available on github:\n * https://github.com/oisinmulvihill/boaconstructor\n\n\nDocumentation is available here:\n * http://packages.python.org/boaconstructor\n\nAn Example\n----------\n\nI'll let the code and comments do the talking::\n\n from boaconstructor import Template\n\n # Some shared information in a dict. This could also be a class instance\n # or something else that supports getattr and hasattr.\n #\n common = dict(\n timeout = 30,\n email = \"admin@example.com\"\n )\n\n # This is a template created in a module. You need one of these. I pass in\n # references that are available at this stage. The 'host.$.name' I will pass\n # in at render time.\n #\n webserver_data = Template('webserver',\n dict(\n interface = 'host.$.name',\n port = 32189,\n timeout = 'common.$.timeout',\n alert_email = 'common.$.email',\n ),\n # This is uses common as an 'internal' reference\n references={'common':common}\n )\n\n # At run time I can pass 'external' references to resolve the hostnames.\n # Maybe I got these from a database or some other source.\n #\n machine_1 = webserver_data.render({'host': {'name': 'myserver1'}}),\n # {'alert_email': 'admin@example.com', 'interface': 'myserver1', 'port': 32189, 'timeout': 30}\n\n machine_2 = webserver_data.render({'host': {'name': 'myserver2'}}),\n # {'alert_email': 'admin@example.com', 'interface': 'myserver2', 'port': 32189, 'timeout': 30}\n\n\n # Now I can pass these to Cheetah/Mako/etc to render a specific type of\n # XML/INI/Text configuration files.", "description_content_type": null, "docs_url": "https://pythonhosted.org/boaconstructor/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "Apache License v2.0", "maintainer": null, "maintainer_email": null, "name": "boaconstructor", "package_url": "https://pypi.org/project/boaconstructor/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/boaconstructor/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/boaconstructor/0.3.0/", "requires_dist": null, "requires_python": null, "summary": "The boacontructor is a templating library for *data*, i.e. templating for dictionaries.", "version": "0.3.0" }, "last_serial": 786942, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b0be1607458cff4870c98d4a2cedfad7", "sha256": "b4ce2777dc7e04b3db83a964273d5286a250b1d58c8ef5a3532e9200045fa082" }, "downloads": -1, "filename": "boaconstructor-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b0be1607458cff4870c98d4a2cedfad7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7265, "upload_time": "2011-03-29T23:15:55", "url": "https://files.pythonhosted.org/packages/00/84/ea1a82dbd48fd97ecbfd173390ad200d72501ded1a5f8ed20d2debefd1f7/boaconstructor-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "7dc81affb331825dc42d81f800f39bf3", "sha256": "3bc9d2ad31b8aad2f768275e0d223e3fe0eff6b9a297f1efa9a39fab6e94ed12" }, "downloads": -1, "filename": "boaconstructor-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7dc81affb331825dc42d81f800f39bf3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9686, "upload_time": "2011-04-01T15:43:18", "url": "https://files.pythonhosted.org/packages/cd/7b/7b445642d11cefaa2f94ebf7572c0290ccaa3f8cc2eed3697c5842dc0319/boaconstructor-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "Version 0.3.0", "digests": { "md5": "01ff6dce9832058426490da25390441f", "sha256": "8aea33b8eccd4d074f63cd416a040182932b7599404f0b45545e15b24976d613" }, "downloads": -1, "filename": "boaconstructor-0.3.0.tar.gz", "has_sig": false, "md5_digest": "01ff6dce9832058426490da25390441f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13076, "upload_time": "2011-05-11T17:42:56", "url": "https://files.pythonhosted.org/packages/8f/0e/f6e0b30f8c0d8d6d52d661a5b820bbbf26b36cdd8624e5705605ad62106a/boaconstructor-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "Version 0.3.0", "digests": { "md5": "01ff6dce9832058426490da25390441f", "sha256": "8aea33b8eccd4d074f63cd416a040182932b7599404f0b45545e15b24976d613" }, "downloads": -1, "filename": "boaconstructor-0.3.0.tar.gz", "has_sig": false, "md5_digest": "01ff6dce9832058426490da25390441f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13076, "upload_time": "2011-05-11T17:42:56", "url": "https://files.pythonhosted.org/packages/8f/0e/f6e0b30f8c0d8d6d52d661a5b820bbbf26b36cdd8624e5705605ad62106a/boaconstructor-0.3.0.tar.gz" } ] }