Skip to main content

Email reply parser

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

email_reply_parser_jimmy927-0.6.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

email_reply_parser_jimmy927-0.6.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file email_reply_parser_jimmy927-0.6.2.tar.gz.

File metadata

File hashes

Hashes for email_reply_parser_jimmy927-0.6.2.tar.gz
Algorithm Hash digest
SHA256 45b644ed9bd31d48f9e290b7544743cf650755d07cc3ec9921e0b4a52484f95e
MD5 87506b0a6ea7cd711ab5441ca4b7aae7
BLAKE2b-256 0ce952597e15d5209c034671aa941b68060f5929ce7c406628efa2a2f8f44562

See more details on using hashes here.

File details

Details for the file email_reply_parser_jimmy927-0.6.2-py3-none-any.whl.

File metadata

File hashes

Hashes for email_reply_parser_jimmy927-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9bc51723f069e0d51b74d28d9c571e37a3958aab339a6042bbe944ec03e4222b
MD5 16d0c3eac07db7c6f9db1918c294ed04
BLAKE2b-256 8452ab153c17eb8d96e4c1e6c28269a2f58c72dd997bf3c49b51f990dafaf41c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page