--- id: tnefparse version: "1.4.0" license: LGPL license_treatment: copyleft maintenance: active --- # tnefparse — a TNEF decoding library written in Python, without external dependencies License: copyleft · Maintenance: active · Downloads: 189.3K/mo ## What it is and what it does tnefparse is a pure-Python library for decoding TNEF (Transport Neutral Encapsulation Format), a Microsoft format used to wrap email message content and attachments. It parses TNEF streams and exposes the decoded message components—attachments, body text (plain, HTML, or RTF), MAPI properties, and metadata—as Python objects. The library includes both a programmatic API for integration into applications and a command-line utility for direct file inspection and extraction. With no external dependencies beyond Python itself, it runs on CPython 3.6+ and PyPy3. The package has been actively maintained since 2012, with recent improvements including embedded message object support, JSON export, and type annotations. It is commonly used to handle winmail.dat files and other TNEF-encoded messages that arrive in email systems, particularly those interoperating with Microsoft Exchange or Outlook. Use it for: - Extract attachments from winmail.dat files received in email systems that use TNEF encoding. - Parse and recover message body content (plain text, HTML, or RTF) from TNEF-wrapped emails in mail processing pipelines. - Inspect TNEF file structure and MAPI properties for debugging email interoperability issues between systems. - Batch convert TNEF attachments to ZIP archives or extract them to a specified directory via the command-line tool. - Build email archival or forensic tools that need to decode and index TNEF-formatted messages. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Decodes Microsoft's Transport Neutral Encapsulation Format (TNEF) and extracts attachments, message bodies, and metadata from TNEF-encoded email messages. Yes. The package is production-stable, actively maintained, has zero known vulnerabilities, and requires no external dependencies. Install it if you need to parse TNEF files or extract attachments from Microsoft-encoded email messages. The LGPL license is permissive for most use cases but requires source disclosure if you distribute derivative works. ## Install pip install tnefparse uv add tnefparse poetry add tnefparse ## Installing tnefparse Before you install: Low friction: pure-Python wheel with no runtime dependencies. Actively maintained as of 2026-05-13 with recent commits; last release 2021-01-24 is stable and production-ready. License in practice: LGPL copyleft license: you may use and modify the library freely, but derivative works must remain under LGPL and source must be made available to recipients. Quickstart: pip install tnefparse from tnefparse import TNEF with open("message.tnef", "rb") as f: tnef_obj = TNEF(f.read()) for attachment in tnef_obj.attachments: print(attachment.filename) Requires Python 3.6 or later (or PyPy3); Python 2 is no longer supported. Verify before relying: - Whether the package handles all TNEF variants and edge cases in real-world email systems - Performance characteristics when parsing very large TNEF files or archives with many attachments - Completeness of MAPI property support beyond what is documented in the changelog ## Package facts - License: LGPL (copyleft) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 189.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags TNEF decoding library, extract TNEF attachments, Microsoft TNEF parser, email TNEF format, MAPI property extraction, winmail.dat parser, TNEF to attachment conversion, email-parsing, tnef-format, attachment-extraction [View on SkillFed](https://skillfed.io/packages/tnefparse) · [View on PyPI](https://pypi.org/project/tnefparse/)