Skip to main content

collection of utilities for email-related tasks

Project description

email_utilities

This module is a collection of utility functions for email-related tasks including:

  • Tools for gaining insights about emails for data tasks.

  • Tools for converting email to text or html-like email to text.

Installation

pip install email_utilities

Get started

How to load an email using the load_email function:

from email_utilities import EmailConversion

from pathlib import Path



email_conversion = EmailConversion()

file_path = next(Path("tests/Examples/email").iterdir()) # sample file

email_text = email_conversion.load_email(file_path)

How to convert an email into a readable text format using the convert_email_to_text function:

from email_utilities import EmailConversion

from pathlib import Path



email_conversion = EmailConversion()

file_path = next(Path("tests/Examples/email").iterdir()) # sample file

email_text = email_conversion.load_email(file_path)

email_conversion.convert_email_to_text(email_text)

How to get the structures and their frequencies of one or more emails using the count_email_structures function :

from email_utilities import EmailConversion

from pathlib import Path

from email_utilities import EmailInsights



email_conversion = EmailConversion()

email_insights = EmailInsights()



# for multiple email files

file_dir = list(Path("Examples/email").iterdir()) + list(Path("Examples/html").iterdir()) # sample files

emails = [email_conversion.load_email(file_) for file_ in file_dir]

email_insights.count_email_structures(emails)



# for a single email file

sample_email = emails[6]

email_insights.count_email_structures(sample_email)

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_utilities-1.0.5.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

email_utilities-1.0.5-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file email_utilities-1.0.5.tar.gz.

File metadata

  • Download URL: email_utilities-1.0.5.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.0

File hashes

Hashes for email_utilities-1.0.5.tar.gz
Algorithm Hash digest
SHA256 563f641d19fcab0e5c530a6b9d3ebcdc09d4b4e060da3772030c92f272cf6bf6
MD5 e9722da28c1ccd8457dab8adf6d4d1ed
BLAKE2b-256 e07b050ae622313c832cadb9a96d404833ec7727efed4d85bf1560ff0cf9bb5b

See more details on using hashes here.

File details

Details for the file email_utilities-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for email_utilities-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e6e2228899946dbf2e046b591038e3cba0c4d10de3fc3d7d6f7578c2a1305700
MD5 23dffa1e7b1db272b05f3b34d5c70c26
BLAKE2b-256 c3ce94c158c7cab3c3665d80bb2d4831f6c590fd99ae1bec4a180184d141d986

See more details on using hashes here.

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