Skip to main content

outlook_msg

Build Status

outlook_msg is a Python library by Hamilton Group to process the .msg files that Users can export from Outlook. It is very common for users in organizations that use Outlook to archive data in this format. For example, at Hamilton we see these files store in relation to deals we write. If we want to do automatic processing in a way that feels most natural to end users we need to extract data from these files.

This library is built on top of the excellent compoundfiles library, without which none of this would be possible.

Getting Started

Install using pip:

pip install outlook_msg

Usage

To open an email:

from outlook_msg import Message

with open('file.msg') as msg_file:
    msg = Message(msg_file)

# Contents are the plaintext body of the email
contents = msg.body

# Attachments can be read and saved like so
first_attachment = msg.attachments[0]
with first_attachment.open() as attachment_fp, open(first_attachment.filename, 'wb') as output_fp:
    output_fp.write(attachment_fp.read())

Running the tests

We use pytest to run our tests but you are best to use tox so you can test on all supported Python versions and will ensure a clean environment.

Metadata

Release files for outlook-msg 1.0.0

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

Source distribution (sdist)

Source distribution for outlook-msg 1.0.0
File Size Uploaded Provenance
outlook_msg-1.0.0.tar.gz 5.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for outlook-msg 1.0.0
File Interpreter ABI Platform
outlook_msg-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.7 kB

Release files / outlook_msg-1.0.0.tar.gz

Download URL outlook_msg-1.0.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
482d4f4503e4f15def55f18492796ee43eacdc65c0aac7cbba8afd24947a52d1
BLAKE2b-256 checksum
How to use checksums
bddb10e5e3e82cbf6201ba1555543c061c91fa4d84dd96dbc4920c7b4ffe2a8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2

Release files / outlook_msg-1.0.0-py3-none-any.whl

Download URL outlook_msg-1.0.0-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf13847e55f2b9e7f75717f8764d878775ed6f154edf65504586bec6f72b2372
BLAKE2b-256 checksum
How to use checksums
08e539e3da92cc657880f68357b6b9da0f374058271866d4dc4795b0a15d70e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2

Security for outlook-msg 1.0.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 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