Skip to main content

Email Reply Parser for Python

A port of GitHub's Email Reply Parser library, by the fine folks at Zapier.

Original port seems abandoned since 2020, this is an attempt to maintain it.

Python Tests PyPI version

Summary

Email Reply Parser makes it easy to grab only the last reply to an on-going email thread.

Say you'd like to parse out a user's response to your transaction email messages:

Yes that is fine, I will email you in the morning.

On Fri, Nov 16, 2012 at 1:48 PM, Zapier <contact@zapier.com> wrote:

> Our support team just commented on your open Ticket:
> "Hi Royce, can we chat in the morning about your question?"

Email clients handle reply formatting differently, making parsing a pain. We include tests for many cases. The parsed email:

Yes that is fine, I will email you in the morning.

Installation

Using pip, install directly from PyPI:

pip install email-reply-parser-jimmy927

Or install the latest version from GitHub:

pip install git+https://github.com/jimmy927/email-reply-parser.git

Tutorial

How to parse an email message

Step 1: Import email reply parser package

from email_reply_parser import EmailReplyParser

Step 2: Provide email message as type String

EmailReplyParser.read(email_message)

How to only retrieve the reply message

Step 1: Import email reply parser package

from email_reply_parser import EmailReplyParser

Step 2: Provide email message as type string using parse_reply class method.

EmailReplyParser.parse_reply(email_message)

Release files for email-reply-parser-jimmy927 0.6.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 email-reply-parser-jimmy927 0.6.2
File Size Uploaded
email_reply_parser_jimmy927-0.6.2.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for email-reply-parser-jimmy927 0.6.2
File Interpreter ABI Platform
email_reply_parser_jimmy927-0.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release files / email_reply_parser_jimmy927-0.6.2.tar.gz

Download URL email_reply_parser_jimmy927-0.6.2.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
45b644ed9bd31d48f9e290b7544743cf650755d07cc3ec9921e0b4a52484f95e
BLAKE2b-256 checksum
How to use checksums
0ce952597e15d5209c034671aa941b68060f5929ce7c406628efa2a2f8f44562
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / email_reply_parser_jimmy927-0.6.2-py3-none-any.whl

Download URL email_reply_parser_jimmy927-0.6.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9bc51723f069e0d51b74d28d9c571e37a3958aab339a6042bbe944ec03e4222b
BLAKE2b-256 checksum
How to use checksums
8452ab153c17eb8d96e4c1e6c28269a2f58c72dd997bf3c49b51f990dafaf41c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.6.2 This release

2 release files

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