References¶
Related projects¶
- pyxy - Write HTML tags directly in Python (like JSX). Uses htpy to generate markup. A modern take on pyxl.
Projects That Use htpy¶
- voterbowl.org - College students win prizes by checking if they are registered to vote: Github repository.
Prior implementations of HTML in Python¶
htpy was heavily inspired by many other libraries that came before it.
- JSX/React - Made writing HTML in a programming language popular.
- pyxl, pyxl3, pyxl4 - Write HTML in Python with JSX-like syntax. Not actively maintained.
- htbuilder - Very similar to htpy but does not currently support automatic escaping.
- nevow.stan - Probably the earliest use of
[]
syntax for specifying children. Not actively maintained. - breve - Another early implementation of HTML in Python, Using getattr
[]
syntax for children. Not actively maintained. - hyperscript - JavaScript library that also uses CSS selector-like syntax for specifying id and classes.
- hyperpython - A Python interpretation of hyperscript. Not actively maintained.
- h by Adam Johnson - Similar to htpy, uses call syntax (
()
) for attributes and getitem ([]
) for children. - lxml.builder - lxml's
E
allows creating XML/XHTML documents from Python.
Articles About HTML Generation Without Templates¶
- Jeff Atwood - You're Doing It Wrong - Stack Overflow co-founder Jeff Atwood
- Tavis Rudd - Throw out your templates - Tavis Rudd, creator of Python template language "Cheetah" argues for creating HTML without templates.
- David Ford - 80% of my coding is doing this (or why templates are dead) - Discusses various techniques for rendering HTML.