Skip to main content

The leightweight parser for emlx files.

Project description


Emlx is the lightweight parser for .emlx files as used by


Install and update using pip:

pip install emlx

Basic usage

>>> import emlx
>>> m ="12345.emlx")
>>> m.headers
{'Subject': 'Re: Emlx library ✉️',
 'From': 'Michael <>',
 'Date': 'Thu, 30 Jan 2020 20:25:43 +0100',
 'Content-Type': 'text/plain; charset=utf-8',
>>> m.text
"You're welcome. :)\n\n> Python <> wrote:\n>\n> Thank you!\n\n"
>>> m.html is None
>>> m.plist
{'color': '000000',
 'conversation-id': 12345,
 'date-last-viewed': 1580423184,
 'flags': {...}
>>> m.flags
{'read': True, 'answered': True, 'attachment_count': 2}


An .emlx file consists of three parts:

  1. bytecount on first line;
  2. email content in MIME format (headers, body, attachments);
  3. Apple property list (plist) with metadata.

The second part (2.) is parsed by the email library. It is included in the Python standard library. Message objects generated by emlx extend email.message.Message and thus give access to its handy features. Additionally, emlx message objects provide the attributes bytecount (1.) as integer and plist (3.) as a Python dictionary. For convenience, it also offers the attributes headers, text, html, url, id, and flags.


The emlx file format was introduced by Apple in 2005. It is similar to eml-files popular with other email clients; the difference is the added bytecount (start) and plist (end). For more, see here.

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

emlx-1.0.4.tar.gz (4.6 kB view hashes)

Uploaded source

Built Distribution

emlx-1.0.4-py3-none-any.whl (6.2 kB view hashes)

Uploaded py3

Supported by

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