On this page
  1. parse-mw
  2. Role
  3. Install
  4. Quickstart
  5. When to Reach for It
  6. Gotchas & Pitfalls
  7. Pairs With
  8. Metadata

parse-mw

Prev: parse-html5 | Up: projects | Next: parse-xml1
Rel: wispsy, Foundation, parse-md
Ref: wispsy on GitHub
Tags: #public #wispsy #project #foundation #tier/specialized


Role

Bounded, source-preserving MediaWiki parsing (parse) and safe typed HTML rendering (render) for Python 3.14+ (0.1.0, zero runtime deps)—modeling headings, sections, lists, templates, tables, links, references, and categories as immutable dataclass nodes.

Install

python -m pip install parse-mw

Quickstart

from parse_mw import parse, render

doc = parse("== Heading ==\n\nHello '''bold''' [[Target|label]].")
assert doc.to_mediawiki().startswith("== Heading ==")
assert "<strong>bold</strong>" in doc.to_html()

result = render("{| class=\"wikitable\"\n|-\n! A !! B\n|-\n| 1 || 2\n|}")
assert "<table>" in result.html

When to Reach for It

Gotchas & Pitfalls

Pairs With


Metadata

type: project-card
slug: parse-mw
org: wispsy
repo: wispsy/parse-mw
package: parse-mw
version: 0.1.0
requires_python: ">=3.14"
layer: foundation
topic: wispsy-foundation
status: active
language: python
source_docs: README.md, docs/

Linked from

Related notes