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()
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)
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.0.tar.gz
(3.2 kB
view details)
Built Distribution
File details
Details for the file email_utilities-1.0.0.tar.gz
.
File metadata
- Download URL: email_utilities-1.0.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | defb9671e3f6130c2cd6f6c48fd9fc2ca4add22a46afcc63a9279ee76f0da7fa |
|
MD5 | 865c7c660c4c8c5e268c67a55dfc4747 |
|
BLAKE2b-256 | 197248922747c316d8c3a8d9395991389c1281456939a590a8586d11ff1fbd8c |
File details
Details for the file email_utilities-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: email_utilities-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42e356840996f4edb260e02eff5edac61132b7b49ea1518dccc1b4f9dfb64617 |
|
MD5 | ea113b2468de764fe26a24030e0f3aab |
|
BLAKE2b-256 | 47d87011bc3f4b62a49902278ed43c885015472cf702d64c17e9a51aed9b1b40 |