{ "info": { "author": "Michael F. Ellis", "author_email": "michael.f.ellis@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n- [Python htmltree project](#python-htmltree-project)\n\t- [Create and manipulate HTML and CSS from the comfort of Python](#create-and-manipulate-html-and-css-from-the-comfort-of-python)\n\t\t- [Installation](#installation)\n\t\t- [Quick Start](#quick-start)\n\t\t\t- [Open a Python interpreter and type or paste the following](#open-a-python-interpreter-and-type-or-paste-the-following)\n\t\t\t- [Render and print the HTML](#render-and-print-the-html)\n\t\t\t- [Now add some styling and text ...](#now-add-some-styling-and-text)\n\t\t\t- [and print the result.](#and-print-the-result)\n\t\t- [Reserved words and hyphenated attributes](#reserved-words-and-hyphenated-attributes)\n\t\t- [Viewing your work](#viewing-your-work)\n\t- [Discussion](#discussion)\n\t\t- [Public members](#public-members)\n\t\t- [Rendering](#rendering)\n\t- [Usage tips](#usage-tips)\n\t\t- [Rolling your own](#rolling-your-own)\n\t\t- [Bundling](#bundling)\n\t\t- [Looping](#looping)\n\t\t- [Using htmltree with Transcrypt\u2122](#using-htmltree-with-transcrypt)\n\t- [List of wrapper functions](#list-of-wrapper-functions)\n# Python htmltree project\n\n## Create and manipulate HTML and CSS from the comfort of Python\n * Easy to learn. Consistent, simple syntax.\n * 85 predefined tag functions.\n * Create HTML on the fly or save as static files.\n * Flexible usage and easy extension. \n * Run locally with CPython or as Javascript in the browser using Jacques De Hooge's [*Transcrypt\u2122*](https://transcrypt.org/) Python to JS transpiler\n * Dependencies: Python 3.x\n\n### Installation\n`pip install htmltree`\n\n### Quick Start\n\n#### Open a Python interpreter and type or paste the following\n```\nfrom htmltree import *\nhead = Head()\nbody = Body()\ndoc = Html(head, body)\n```\n#### Render and print the HTML\n```\n>>> print(doc.render(0))\n\n
\n \n \n \n\n```\n#### Now add some styling and text\n```\nwho = Meta(name=\"author\",content=\"Your Name Here\")\nhead.C.append(who)\nbody.A.update(dict(style={'background-color':'black'}))\nbanner = H1(\"Hello, htmltree!\", _class='banner', style={'color':'green'})\nbody.C.append(banner)\n```\n#### and print the result.\n```\n>>> print(doc.render(0))\n\n \n \n \n \n