Skip to main content

This package makes reading emails from Enron dataset easy.

Project description

Installation

pip3 install enron_reader

Prerequisites

For using this package, you must have the Enron email corpus locally. If you don’t, either download and extract it using the link provided here, or run

download_enron /path/to/download/enron

in your terminal after installing this package.

Then, you should have a folder named ‘maildir’ in that directory. It should contain a directory for each user (Enron employee)

Usage example

from enron_reader import EnronReader
reader = EnronReader("/path/to/enron/root")

print(reader.get_user_ids())

mailbox = reader.get_mailbox_for_user("keiser-k")

main_folders = mailbox.root_folder.subfolders
some_message = main_folders[0].messages[0]

print(some_message.subject)

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

enron_reader-0.25.tar.gz (6.3 kB view hashes)

Uploaded Source

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