{"id":24836,"library":"wikitextparser","title":"wikitextparser","description":"A simple parsing tool for MediaWiki's wikitext markup. Current version: 0.56.4. Releases follow no fixed cadence.","status":"active","version":"0.56.4","language":"python","source_language":"en","source_url":"https://github.com/5j9/wikitextparser","tags":["mediawiki","wikitext","parsing"],"install":[{"cmd":"pip install wikitextparser","lang":"bash","label":"Install wikitextparser"}],"dependencies":[],"imports":[{"note":"Use alias for brevity.","wrong":"","symbol":"WikiText","correct":"import wikitextparser as wtp"},{"note":"Direct import of the parse function.","wrong":"","symbol":"parse","correct":"from wikitextparser import parse"}],"quickstart":{"code":"import wikitextparser as wtp\n\nwikitext = \"\"\"[[Link]]\n== Heading ==\nSome ''italic'' text.\"\"\"\nparsed = wtp.parse(wikitext)\nprint(parsed.templates)  # empty list\nprint(parsed.wikilinks)  # [WikiLink('Link')]","lang":"python","description":"Parse a simple wikitext string and access wikilinks and templates."},"warnings":[{"fix":"Check `len(result.templates) > 0` to see if any templates exist.","message":"The library returns an empty list for `templates` if no template syntax is present. New users often expect `None` instead.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `parse(text, strip_comments=True)` instead of calling `.remove_comments()`.","message":"The `remove_comments` method was deprecated in v0.55 in favor of the `strip_comments` parameter","severity":"deprecated","affected_versions":">=0.55"},{"fix":"Ensure wikitext is well-formed or catch `wikitextparser.ParseError`.","message":"Wikitext with unclosed tags may raise a `ParseError`. The parser expects valid markup.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.56.4':13 'cadenc':18 'current':11 'fix':17 'follow':15 'markup':10 'mediawiki':7,19 'pars':4,21 'releas':14 'simpl':3 'tool':5 'version':12 'wikitext':9,20 'wikitextpars':1","created_at":"2026-05-01T08:15:10.592906+00:00","updated_at":"2026-05-01T08:15:10.592906+00:00","problems":[{"fix":"Run `pip install wikitextparser`.","cause":"The package is not installed.","error":"ModuleNotFoundError: No module named 'wikitextparser'"},{"fix":"Upgrade to latest version: `pip install --upgrade wikitextparser`.","cause":"Using an outdated version where attributes differed.","error":"AttributeError: 'WikiText' object has no attribute 'templates'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.0.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/5j9/wikitextparser","docs":null,"changelog":null,"pypi":"https://pypi.org/project/wikitextparser/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}