{ "info": { "author": "Da_Blitz", "author_email": "code@pocketnix.org", "bugtrack_url": null, "classifiers": [], "description": "Wither\n======\nXML/HTML Generation DSL\n\nIntro\n------\nWither is a library designed to make XML generation under python as simple and \nas nicely formatted as python code.\n\nWither is implemented as a thin statless wrapper around etree.Element objects \nand works by making use of the 'with' keyword in python to build a nested tree \nof etree objects that can be processed with standard tools/techniques\n\nby using python as a DSL you can automatically ensure that all tags are \nproperly closed and also execute arbitrary python code to build things such as \nlists or to embed widgets\n\nExample\n--------\n>>> import lxml.usedoctest\n>>> from wither import Node\n>>> n = Node('html')\n>>> with n.head as head:\n... head.title == 'Wither README Example'\n... head.link(href='http://code.pocketnix.org/wither', rel='homepage')\n<...>\n>>> with n.body as body:\n... body.h1 == 'Welcome to the Wither README'\n... with body.div as div:\n... div.p == 'This is the example from the README file'\n... div.p(style='color: red;') == 'Big Red Warning'\n<...>\n>>> print(n)\n
This \nis the example from the README file
Big Red \nWarning