--- id: eml-parser version: "3.0.3" license: AGPLv3+ license_treatment: agpl maintenance: active --- # eml-parser — Python EML parser library License: agpl · Maintenance: active · Downloads: 689.6K/mo ## What it is and what it does eml_parser is a Python library that reads EML (email message) files and returns a structured dictionary containing extracted email metadata and content. It parses standard email headers (from, to, cc, subject, date), reconstructs the server path from received headers, extracts attachment information including file hashes and names, and identifies URLs embedded in message bodies and HTML content. The library is designed for email analysis and forensics workflows where you need programmatic access to email components. The package depends on three common utilities: charset-normalizer for character encoding detection, publicsuffixlist for domain parsing, and python-dateutil for date handling. It is actively maintained, supports current Python versions (3.10 through 3.14), and carries no known security vulnerabilities. Installation is straightforward via pip, though macOS users must have libmagic installed separately if they want the optional filemagic extra. Use it for: - Extract and analyze email headers and metadata from EML files for security investigations or email audits. - Batch process email archives to build indexes of senders, recipients, and subjects for discovery or compliance. - Parse attachment information and compute hashes for malware scanning or deduplication workflows. - Reconstruct email routing paths from received headers to trace message origin and server hops. - Harvest URLs from email bodies and attachments for threat intelligence or link analysis. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses EML (email) files and extracts structured information including headers, body content, attachments with hashes, recipient lists, received server paths, subjects, and URLs found in message text. Yes. The package is actively maintained, has no security vulnerabilities, and provides a straightforward way to parse EML files into structured data. Low install friction and broad Python version support make it accessible. The AGPLv3+ license is a constraint for proprietary software but not for internal tools, open-source projects, or research. Install it if you need to programmatically extract email metadata or content. ## Install pip install eml-parser uv add eml-parser poetry add eml-parser ## Installing eml-parser Before you install: Low friction install with a pure Python wheel; three lightweight runtime dependencies (charset-normalizer, publicsuffixlist, python-dateutil). Actively maintained with a release 26 days ago and recent commits. Requires Python 3.10 or later. License in practice: Licensed under AGPLv3+, a copyleft license requiring that any derivative work or distribution also be licensed under AGPLv3 or compatible terms. Suitable for internal tools and open-source projects, but not for proprietary closed-source software without careful legal review. Quickstart: pip install eml_parser import eml_parser with open('sample.eml', 'rb') as fhdl: raw_email = fhdl.read() ep = eml_parser.EmlParser() parsed_eml = ep.decode_email_bytes(raw_email) print(parsed_eml) Requires Python 3.10 or later. Optional: libmagic system library if using the filemagic extra on macOS. Verify before relying: - Whether the package handles modern email formats (DKIM, SPF, DMARC headers) beyond basic parsing. - Performance characteristics when parsing large emails or batch processing many files. - Completeness of URL extraction from complex MIME structures and encoded content. ## Package facts - License: AGPLv3+ (agpl) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 689.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags eml file parser, email parsing python, extract email headers, parse eml attachments, email message analysis, email forensics, email metadata extraction, email-parsing, forensics, metadata-extraction [View on SkillFed](https://skillfed.io/packages/eml-parser) · [View on PyPI](https://pypi.org/project/eml-parser/)