skillfed

quotequail

A library that identifies quoted text in plain text and HTML email messages.

quotequail v0.5.0 118.1K downloads/30d#12,131 on PyPI69
Permissive license MIT Active released

What it is and what it does

quotequail is a Python library for parsing email message structure, specifically identifying quoted text in both plain text and HTML formats. It provides four main functions: quote() and quote_html() to separate original text from quoted sections (returning tuples indicating whether each section should be expanded by default), and unwrap() and unwrap_html() to extract forwarded messages or replies by parsing headers and separating top/bottom text from the wrapped content.

The library is designed for email processing workflows where you need to distinguish between a user's original message and quoted or forwarded content. It has one runtime dependency (typing_extensions) and optionally requires libxml for HTML parsing. The package is actively maintained, supports Python 3.10 through 3.12, and carries no known security vulnerabilities.

Use it for:

  • Email client or web mail interface that needs to hide quoted text by default and show only new replies.
  • Email parsing pipeline that extracts forwarded message headers and original content for storage or analysis.
  • Conversation threading system that separates user-written content from quoted context in threaded replies.
  • Email archival or search system that indexes only original content, excluding quoted sections.
  • Automated email response system that needs to identify and extract the actual user message from a reply.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Identifies and separates quoted text from original content in plain text and HTML email messages, and unwraps forwarded messages or replies to extract headers and body text.

Yes, with conditions. The library is actively maintained, has no security vulnerabilities, and solves a specific email parsing problem well. However, high install friction (source-only distribution) may cause deployment friction in some environments. Install it if you need robust email quote detection and can tolerate building from source; skip it if your deployment pipeline requires pre-built wheels.

Install

quotequail on PyPI

pip

pip install quotequail

uv

uv add quotequail

poetry

poetry add quotequail

Installing quotequail

Before you install

High install friction due to source distribution only (no wheels). Actively maintained with a recent release (78 days ago) and steady repository activity. Single lightweight runtime dependency (typing_extensions) keeps the footprint minimal.

License in practice

MIT license is permissive and places no restrictions on use, modification, or distribution in commercial or private projects.

Quickstart

pip install quotequail

import quotequail

result = quotequail.quote("Hello\n\n> Quoted text")
print(result)  # [(True, 'Hello'), (False, '\n> Quoted text')]

HTML methods require libxml to be installed on the system; plain text methods work without it.

Verify before relying

  • Whether the high install friction (source-only distribution) is due to platform-specific compilation needs or simply lack of wheel publishing.
  • Performance characteristics when processing large email messages or bulk operations.
  • Accuracy rates for different email client quote formats and edge cases.

Package facts

License MIT (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies 1 — typing_extensions
Maintenance actively maintained — 78 days since the last release
Last repo commit
First released
Downloads 118,128/month — #12,131 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: quotequail-0.5.0.tar.gz

Environment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Topic :: Communications :: EmailTopic :: Software Development :: Libraries :: Python Modules

Tags

email quote detectionparse quoted text emailunwrap forwarded messagesextract email headersemail message parsingidentify quoted sectionsemail reply unwrapping
email-parsingtext-processing

More Python Modules packages