tnefparse
a TNEF decoding library written in Python, without external dependencies
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later (or PyPy3); Python 2 is no longer supported.
- 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 · maintenance · safety
LGPL (copyleft) — 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.
last release 2021-01-24 (2028 days) · last repo commit 2026-05-13 · 51 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 189,253 downloads/mo, #9,932 on PyPI
Alternatives
Verify before relying
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)- 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
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 on this page. Verify before relying on it.
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
tnefparse on PyPI
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.
Requires Python 3.6 or later (or PyPy3); Python 2 is no longer supported.
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)
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 | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 2,028 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 189,253 / month, #9,932 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: End Users/DesktopLicense :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Communications :: Email |
Evidence: tnefparse-1.4.0-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 › “TNEF decoding library”
- tnefparseDecodes Microsoft's Transport Neutral Encapsulation Format (TNEF) and…
- ldpcProvides decoders for low-density parity check (LDPC) codes,…
- PyMatchingPyMatching is a fast Python/C++ library for decoding quantum error…
Give your agent the search over MCP, or paste the wish link into any chat.
More Email packages
Converts Markdown text to HTML using a Python implementation of John Gruber's Markdown specification, with support for extensions.
Install it if you need to parse Markdown in Python.
aiosmtplib is an asynchronous SMTP client that sends email messages using asyncio, allowing non-blocking email operations in async Python applications.
Wikipedia-API is a Python wrapper for Wikipedia's MediaWiki API that retrieves page content, sections, links, categories, and metadata in both synchronous and asynchronous modes.
Extracts encapsulated HTML and plain text content from RTF bodies in .msg email files, reversing the RTF encapsulation that Microsoft Exchange applies.
Parses Outlook MSG files to extract email messages, attachments, and message properties like sent date and sender information.
Sends and receives email in Django through multiple transactional email service providers (ESPs) with a unified API that avoids vendor lock-in.
Install it if you're using Django and any transactional ESP; the abstraction pays for itself the moment you need to switch providers.
See also extract-msg · mail-parser · rtfparse · cabarchive · eml-parser · msg-parser · pyrfc6266 · striprtf