{ "info": { "author": "Gary van der Merwe", "author_email": "garyvdm@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "`htmlwrite` is a python library for writing html to a file like object, using a pythonic syntax. Use as an alternative to templating engines. \n\n >>> import sys\n >>> \n >>> from htmlwrite import Writer, Tag\n >>> \n >>> writer = Writer(sys.stdout)\n >>> w = writer.write\n >>> c = writer.context\n >>> \n >>> with c(Tag('html')):\n ... with c(Tag('body')):\n ... with c(Tag('div', class_=('foo', ), s_font_weight='bold')):\n ... w('Hello world ')\n ... w(Tag('div'), 'ok, bye.')\n ... \n \n
\n