--- id: python-oxmsg version: "0.0.2" license: MIT license_treatment: permissive maintenance: dormant --- # python-oxmsg — Extract attachments from Outlook .msg files. License: permissive · Maintenance: dormant · Downloads: 3.4M/mo ## What it is and what it does python-oxmsg is a Python library for reading Outlook MSG files and extracting their contents. It parses the binary MSG format (MS-OXMSG) to give you access to message text, metadata like sender and sent date, and any attached files. The library is read-only—it extracts data from existing MSG files but does not support modifying messages or creating new ones from scratch. The package provides both a programmatic API (via the Message class) and a command-line utility for diagnostic inspection. It depends on click for CLI support, olefile for parsing the OLE2 container format that MSG files use, and typing_extensions for type hints. It supports Python 3.9 through 3.12 and is classified as Alpha, reflecting that it handles the core extraction use case but may not cover all MSG format edge cases. Use it for: - Batch extract attachments from a folder of Outlook MSG files for archival or processing. - Programmatically read email metadata (sender, subject, date) from MSG files in an automation workflow. - Inspect MSG file structure and properties using the CLI dump command for debugging or forensic analysis. - Integrate MSG parsing into a document management or email migration tool. - Extract message text and metadata to index or search Outlook messages outside of Outlook. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses Outlook MSG files to extract email messages, attachments, and message properties like sent date and sender information. Yes, if you need to read Outlook MSG files and extract attachments or metadata. The package is straightforward, has low install friction, and carries no known security vulnerabilities. The dormant maintenance status (557 days since last release) is a minor concern for a young Alpha project, but the recent repository activity and permissive MIT license make it a reasonable choice for read-only MSG extraction tasks. Not suitable if you need to modify or create MSG files. ## Install pip install python-oxmsg uv add python-oxmsg poetry add python-oxmsg ## Installing python-oxmsg Before you install: Low friction install with three lightweight runtime dependencies (click, olefile, typing_extensions). Project is dormant—last release was 557 days ago—but the repository remains active with a recent commit on 2025-02-03. License in practice: MIT license is permissive, allowing commercial and private use with minimal restrictions. Quickstart: pip install python-oxmsg from oxmsg import Message msg = Message.load("message.msg") print(msg.sender) for attachment in msg.attachments: with open(attachment.file_name, "wb") as f: f.write(attachment.file_bytes) Requires Python 3.9 or later. Verify before relying: - Whether the package handles all MSG format variants and edge cases reliably, given its Alpha status. - Performance characteristics when processing large MSG files or many attachments. - Whether dormancy (557 days since last release) signals maintenance concerns or stable maturity. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 3.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags outlook msg file parser, extract email from msg files, outlook attachment extraction, msg file reader python, parse outlook messages, email attachment extractor, msg format parser, email-parsing, outlook-integration, file-format [View on SkillFed](https://skillfed.io/packages/python-oxmsg) · [View on PyPI](https://pypi.org/project/python-oxmsg/)