Skip to content

v0.4.0

Choose a tag to compare

@gaborbernat gaborbernat released this 16 Jun 18:53
· 1885 commits to main since this release
Immutable release. Only release title and notes can be modified.

Features

  • Build and edit the tree, not just read it: construct Element, Text, and Comment nodes and rearrange them with the full set of insert, wrap, extract, and normalize methods, with attrs and .text/.data as live setters. copy, deepcopy, and pickle duplicate a subtree. (#19) by @gaborbernat.
  • Round out the node model: ProcessingInstruction and CData join the hierarchy, Doctype exposes its public_id and system_id, and every node type supports structural pattern matching. (#22) by @gaborbernat.

Documentation

  • Learn the write path through new tutorial, how-to, and explanation docs, backed by benchmarks showing turbohtml builds and rewrites trees about twice as fast as lxml and an order of magnitude faster than BeautifulSoup. (#19) by @gaborbernat.
  • Port to turbohtml with migration guides from BeautifulSoup, lxml, selectolax, html5lib, and the standard library, each mapping the source library's idioms to their turbohtml equivalents and flagging behavior differences. (#23) by @gaborbernat.

🐍 PyPI release

📜 Full Changelog