Skip to main content

Coverage Status CLA assistant

parse-emails

Parses an email message file and extracts the data from it.

The key features are:

  • Supports .eml and .msg files.
  • Extracts nested attachments.

Requirements

Python 3.11+

Installation

$ pip install parse-emails
$ brew install libmagic

Usage

The main class EmailParser contains all what you need to parse an email:

import parse_emails

email = parse_emails.EmailParser(file_path=<file_path>, max_depth=3, parse_only_headers=False)
email.parse()
print(email.parsed_email['Subject'])

Inputs

Argument Name Description
file_path* the file_path of a in msg or eml format
parse_only_headers Will parse only the headers and return headers table, Default is False
max_depth How many levels deep we should parse the attached emails (e.g. email contains an emails contains an email). Default depth level is 3. Minimum level is 1, if set to 1 the script will parse only the first level email
file_info the file info

Contributing

Contributions are welcome and appreciated. To contribute you can submit a PR.

Before merging any PRs, we need all contributors to sign a contributor license agreement. By signing a contributor license agreement, we ensure that the community is free to use your contributions.

When you open a new pull request, a bot will evaluate whether you have signed the CLA. If required, the bot will comment on the pull request, including a link to accept the agreement. The CLA document is also available for review as a PDF.

If the license/cla status check remains on Pending, even though all contributors have accepted the CLA, you can recheck the CLA status by visiting the following link (replace [PRID] with the ID of your PR): https://cla-assistant.io/check/demisto/email-parser?pullRequest=[PRID] .

Metadata

Release files for parse-emails 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parse-emails 0.2.2
File Size Uploaded Provenance Actions
parse_emails-0.2.2.tar.gz 8.9 MB Without provenance Details for parse_emails-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parse-emails 0.2.2
File Interpreter ABI Platform Actions
parse_emails-0.2.2-py3-none-any.whl Python 3 none any Details for parse_emails-0.2.2-py3-none-any.whl

Total release size: 17.8 MB

Release files / parse_emails-0.2.2.tar.gz

Download URL parse_emails-0.2.2.tar.gz
Size 8.9 MB
Tags Source
SHA-256 checksum
How to use checksums
5d38b97840518bdcc0619198bb2a82e2ad1d80d12eeef7e81d07ef01f6e23223
BLAKE2b-256 checksum
How to use checksums
edba3806ee4a8450a5196d14fea8fa366e32fdf6b84ecf59e8c135662d976a98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.14.4 Linux/6.6.87+

Release files / parse_emails-0.2.2-py3-none-any.whl

Download URL parse_emails-0.2.2-py3-none-any.whl
Size 8.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ad080ad28c94128c9c6338c1959893c5ac36426db60c49a9be0703c90193783c
BLAKE2b-256 checksum
How to use checksums
206ea684b90e7a405570fdd541015d455863e979e0ad32f0bf61c434d915c9d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.14.4 Linux/6.6.87+

Security for parse-emails 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page