wikitextparser
A simple parsing tool for MediaWiki's wikitext markup.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, no security issues, and fills a specific need for MediaWiki wikitext parsing. The GPLv3 copyleft license is a hard constraint only if you need proprietary distribution; for open-source projects, wiki automation, or data extraction, it is a straightforward choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- Low install friction with a pure-Python wheel distribution.
- Actively maintained with a recent release (14 days ago) and steady commit activity.
License · maintenance · safety
copyleft license (copyleft) — Licensed under GPLv3 (copyleft). Any derivative work or distribution must also be open-source under GPLv3; proprietary applications cannot incorporate this code without releasing their own source.
last release 2026-07-31 (14 days) · last repo commit 2026-08-04 · 328 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 127,237 downloads/mo, #11,749 on PyPI
Alternatives
Verify before relying
pip install wikitextparser
import wikitextparser as wtp
parsed = wtp.parse('{{template|arg=value}}')
print(parsed.templates)- Whether the library handles all edge cases and malformed HTML robustly (documentation notes it is not a fully-fledged HTML parser).
- Performance characteristics on very large wikitext documents or deeply nested template structures.
What it is and what it does
WikiTextParser is a library for parsing and manipulating MediaWiki's wikitext syntax. It lets you extract structured elements—templates, parameters, wikilinks, tables, sections, lists, and HTML tags—from raw wiki markup and modify them programmatically. The library handles nested templates, colspan/rowspan in tables, category detection, and section hierarchy, making it suitable for bulk editing, data extraction, or automated wiki maintenance tasks.
The package depends on regex and wcwidth for pattern matching and text width calculation. It is actively maintained, supports modern Python versions (3.8+), and has no known security vulnerabilities. The GPLv3 license means any code using it must also be open-source under the same license.
Use it for
- Extract template arguments and parameter values from Wikipedia or MediaWiki dumps for data analysis.
- Bulk clean up or refactor wiki markup—remove duplicate template arguments, rename sections, or update wikilinks.
- Parse and validate wikitext structure before uploading edits to a wiki via API.
- Build wiki bots that read, modify, and rewrite wikitext without corrupting nested markup.
- Convert or normalize wiki markup (e.g., change list types or reformat table structure).
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, no security issues, and fills a specific need for MediaWiki wikitext parsing. The GPLv3 copyleft license is a hard constraint only if you need proprietary distribution; for open-source projects, wiki automation, or data extraction, it is a straightforward choice.
Install
wikitextparser on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release (14 days ago) and steady commit activity. Two lightweight runtime dependencies (regex and wcwidth) add minimal overhead.
Requires Python 3.8 or later.
License in practice
Licensed under GPLv3 (copyleft). Any derivative work or distribution must also be open-source under GPLv3; proprietary applications cannot incorporate this code without releasing their own source.
Quickstart
pip install wikitextparser
import wikitextparser as wtp
parsed = wtp.parse('{{template|arg=value}}')
print(parsed.templates)
Verify before relying
- Whether the library handles all edge cases and malformed HTML robustly (documentation notes it is not a fully-fledged HTML parser).
- Performance characteristics on very large wikitext documents or deeply nested template structures.
Package facts
| License | copyleft license copyleft |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesregexwcwidth |
| Maintenance | Actively maintained 14 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 127,237 / month, #11,749 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: GNU General Public License v3 (GPLv3)Programming Language :: PythonTopic :: Text Processing |
Evidence: wikitextparser-1.0.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mediawiki wikitext parser”
- wikitextparserParses and manipulates MediaWiki wikitext markup, extracting and…
- mwparserfromhellParses MediaWiki wikicode into a queryable syntax tree, allowing you…
- mwtypesProvides standardized Python classes for MediaWiki data types,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also mwparserfromhell · wikipedia · mwcli · mwxml · pywikibot · jira2markdown · ada-url · mkdocs-embed-external-markdown · mwclient · py-partiql-parser