Hacker GitHub

← All repos

Knio/dominate

View on GitHub ↗ ★ 1,831 Python

Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API. It allows you to write HTML pages in pure Python very concisely, which eliminate the need to learn another template language, and to take advantage of the more powerful features of Python.

6 mentions on Hacker News by 6 people: 1 story, 5 comments · first 2018-10-12 · latest 2025-09-03

Mentions per year 6 mentions · busiest year 2023 (2)
20082026
  1. …write code as code. I ended up spending a week implementing something similar to Dominate in Rust. https://github.com/Knio/dominate
  2. ▲ 1
    Dominate: A Python/JavaScript lib for generating HTML documents
    story by prabhu-yu · 2024-12-14 · 1 comment
  3. …a matter of getting used to it - and after a while it end ups feeling very natural to use :-) 1: https://github.com/Knio/dominate#readme
  4. Pretty much how https://github.com/Knio/dominate does it, but no context variable binding (otherwise gets messy with lots of nesting)
    comment by pphysch · 2023-05-27 · in The obvious final step
  5. …document as the tree of nodes that it is in your programming language or treat it like a string. https://github.com/Knio/dominate is a Python lib that implements this principal.
  6. I feel you, however I also love https://github.com/Knio/dominate - a Python library to generate HTML. Generating HTML always felt awkward for me in many languages. From PHP where you sprinkle PHP between HTML or HTML between PHP, to…
    comment by jacobush · 2018-10-12 · in Asterisks in Python