{ "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)\nWither README Example

Welcome to the Wither README

This \nis the example from the README file

Big Red \nWarning

\n\nFeatures\n---------\n* Uses python as a DSL for XML Generation\n* Uses/Abuses python syntax to make node generation shorter and more visually \n appealing\n* Uses lxml for document generation\n* Possibility to fall back to built in etree implementations (XXX TODO: Write \n me)\n* Easy widget creation\n* Implicit verification of document correctness (python's indentation means you \n cant forget to close a tag)\n\n\nDependencies\n-------------\n* lxml - may be possible ot replace this with python's inbuilt etree support\n\nInstallation\n-------------\n$ virtualenv env\n$ . env/bin/activate\n# pip install wither\n\nCompatibility\n--------------\nWither supports Python 2.7 and Python 3.2 and up as its supported python \nversions but may also work on earlier versions of python 3 and python 2.6. \nwhile these platforms are automatically tested to check for breakages these \nearlier versions are not officially supported and failing tests are for \ninformational purposes only.\n\nMotivations\n------------\nWither is very much a project that was written 'because i can'. I have multiple \npython modules that abuse python syntax in interesting ways to do things like \npattern matching of automatic retry of transactions for Databases that are all \nconcise and visually appealing.\n\nafter seeing the 'with' statement and its use in python 2.6 with nesting for \nusing multiple context generators (instead of python 2.7's flattened version) i \ndecided to see if i could use this to upgrade an existing XML generation \nprogram that used a similar concept with object.\n\nthe aim of this project is not to create a fast generator but create something \nthat looks 'right' when included inline with python code and support dynamic \nfeatures like a string template library would.\n\nFuther Ideas\n-------------\nBy using 'yeild' in strategic spots it may be possible to paritally render a \ntemplate allowing one to send a prerendered 'frame' (or the head part of it at \nleast) and then generate the body followed by the tail (of the frame) to the \nclient thereby speeding up transmission of the first byte to the client and \navoiding a dogpile of transmission at the end of the request. this should allow \nclients to render thier pages quicker as well as they have partial data with \nwhich they can start planning out the layout of the page", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://code.pocketnix.org/wither", "keywords": "XML HTML Generation DSL", "license": "MIT BSD", "maintainer": null, "maintainer_email": null, "name": "wither", "package_url": "https://pypi.org/project/wither/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/wither/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://code.pocketnix.org/wither" }, "release_url": "https://pypi.org/project/wither/1.1/", "requires_dist": null, "requires_python": null, "summary": "XML Generation DSL", "version": "1.1" }, "last_serial": 1025648, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "4dccefe735666095d3c58d187568e2e7", "sha256": "a0162443aa315f4078a534e9420b33bb424f343e157ceb665e514b7a52d01321" }, "downloads": -1, "filename": "wither-1.1.tar.bz2", "has_sig": false, "md5_digest": "4dccefe735666095d3c58d187568e2e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6528, "upload_time": "2014-03-11T01:59:35", "url": "https://files.pythonhosted.org/packages/51/cb/896b16140760d36c21712a5b77b36358e07af9fabd874d15a7964f32bb59/wither-1.1.tar.bz2" }, { "comment_text": "", "digests": { "md5": "02bc62757a6956787cf2fc28b8bd68db", "sha256": "13af60971a6ebf42b7da7381361f5aa9febba81768b1ec206251254fe9425544" }, "downloads": -1, "filename": "wither-1.1.zip", "has_sig": false, "md5_digest": "02bc62757a6956787cf2fc28b8bd68db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11038, "upload_time": "2014-03-11T01:59:39", "url": "https://files.pythonhosted.org/packages/76/89/dad559623664094f9760705e11025282df1f4f073225f2280fff1ad67b0a/wither-1.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4dccefe735666095d3c58d187568e2e7", "sha256": "a0162443aa315f4078a534e9420b33bb424f343e157ceb665e514b7a52d01321" }, "downloads": -1, "filename": "wither-1.1.tar.bz2", "has_sig": false, "md5_digest": "4dccefe735666095d3c58d187568e2e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6528, "upload_time": "2014-03-11T01:59:35", "url": "https://files.pythonhosted.org/packages/51/cb/896b16140760d36c21712a5b77b36358e07af9fabd874d15a7964f32bb59/wither-1.1.tar.bz2" }, { "comment_text": "", "digests": { "md5": "02bc62757a6956787cf2fc28b8bd68db", "sha256": "13af60971a6ebf42b7da7381361f5aa9febba81768b1ec206251254fe9425544" }, "downloads": -1, "filename": "wither-1.1.zip", "has_sig": false, "md5_digest": "02bc62757a6956787cf2fc28b8bd68db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11038, "upload_time": "2014-03-11T01:59:39", "url": "https://files.pythonhosted.org/packages/76/89/dad559623664094f9760705e11025282df1f4f073225f2280fff1ad67b0a/wither-1.1.zip" } ] }