Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Helper functions for generating HTML documents.

Project Description Helper functions for generating HTML documents.


>>> from htmlfun.elements import html, body, h1
>>> from htmlfun import build_doc
>>> content = body(h1({"class": "header"}, "Hello, world!"))
>>> doc = build_doc(content)
>>> print(doc)

HTML elements are represented as nested lists of strings. These lists can be flattened using the flatten() core function and joined together into an html document. The build_doc() helper function is a wrapper around flatten() that wraps your tags in an HTML5 declaration and a root <html> tag pair.

Release History

Release History

This version
History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
htmlfun-0.1.0.tar.gz (11.5 kB) Copy SHA256 Checksum SHA256 Source May 14, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting