--- id: rtfparse version: "0.9.5" license: MIT license_treatment: permissive maintenance: aging --- # rtfparse — Tool to parse Microsoft Rich Text Format (RTF) License: permissive · Maintenance: aging · Downloads: 307.1K/mo ## What it is and what it does rtfparse is a Python library that reads Microsoft RTF documents and builds an in-memory object tree representing their structure. It then passes that tree to a renderer—currently only HTML_Decapsulator is provided, which extracts HTML that has been embedded within RTF (a common pattern in Outlook email messages). The library also handles RTF decompression, which Outlook uses to reduce file size. You can use it as a command-line tool or import it into your own Python code. The CLI writes logs to ~/rtfparse/ and supports workflows like extracting HTML from .msg files, decompressing RTF, and saving attachments. The library depends on extract-msg to read Outlook message files and compressed-rtf to decompress them when needed. Use it for: - Extract HTML content from RTF-formatted email messages saved by Microsoft Outlook. - Decompress RTF files that have been compressed by Outlook or other Microsoft applications. - Parse RTF documents programmatically and render them to HTML for web display or archival. - Batch-process .msg files to recover embedded HTML and attachments from email archives. - Build custom renderers for RTF documents by extending the parser's tree structure. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses Microsoft Rich Text Format (RTF) documents into an in-memory tree structure and renders them—primarily extracting encapsulated HTML, with optional RTF decompression support for Outlook messages. Yes, if you need to extract HTML from Outlook emails or parse RTF documents. The library is stable (Production/Stable classifier), has no known vulnerabilities, and low install friction. However, maintenance is aging—the last release was over a year ago—so consider whether you need active support or can tolerate a stable but slowly-evolving codebase. ## Install pip install rtfparse uv add rtfparse poetry add rtfparse ## Installing rtfparse Before you install: Low friction: pure Python wheel with four runtime dependencies (argcomplete, compressed-rtf, extract-msg, provide-dir). Maintenance status is aging—last release was 402 days ago, though the repository remains active with a recent commit on 2025-09-10. License in practice: MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice in distributions. Quickstart: pip install rtfparse from rtfparse.parser import Rtf_Parser from rtfparse.renderers.html_decapsulator import HTML_Decapsulator parser = Rtf_Parser(rtf_path="document.rtf") parsed = parser.parse_file() renderer = HTML_Decapsulator() with open("output.html", "w") as f: renderer.render(parsed, f) Requires Python 3.10 or later. Verify before relying: - Whether the HTML_Decapsulator renderer handles all RTF variants and edge cases reliably in production. - Performance characteristics when parsing large or complex RTF documents. - Whether custom renderers beyond HTML_Decapsulator are documented or supported. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 307.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags rtf parser, extract html from rtf, outlook msg to html, rtf document parsing, decompress rtf, rtf renderer, parse rich text format, email-extraction, rtf-parsing, outlook-msg [View on SkillFed](https://skillfed.io/packages/rtfparse) · [View on PyPI](https://pypi.org/project/rtfparse/)