Markupever
The fast, most optimal, and correct HTML & XML parsing library for Python written in Rust.
Install / Use
/learn @awolverp/MarkupeverREADME
MarkupEver is a modern, fast (high-performance), XML & HTML languages parsing library written in Rust.
KEY FEATURES:
- 🚀 Fast: Very high performance and fast (thanks to html5ever and selectors).
- 🔥 Easy: Designed to be easy to use and learn. <abbr title="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere.
- ✨ Low-Memory: Written in Rust. Uses low memory. Don't worry about memory leaks. Uses Rust memory allocator.
- 🧶 Thread-safe: Completely thread-safe.
- 🎯 Quering: Use your CSS knowledge for selecting elements from a HTML or XML document.
- ⚡ Streaming: Incremental/streaming parsing support.
Installation
You can install MarkupEver by using pip:
<small>It's recommended to use virtual environments.</small>
$ pip3 install markupever
Example
Parse
Parsing a HTML content and selecting elements:
import markupever
dom = markupever.parse_file("file.html", "html")
# Or parse a HTML content directly:
# dom = markupever.parse("... content ...", "html")
for element in dom.select("div.section > p:child-nth(1)"):
print(element.text())
Create DOM
Creating a DOM from zero:
from markupever import dom
dom = dom.TreeDom()
root: dom.Document = dom.root()
root.create_doctype("html")
html = root.create_element("html", {"lang": "en"})
body = html.create_element("body")
body.create_text("Hello Everyone ...")
print(root.serialize())
# <!DOCTYPE html>
# <html lang="en">
# <body>Hello Everyone ...</body>
# </html>
Related Skills
himalaya
339.3kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
83.9kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
