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-0.1.0.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file email_utilities-0.1.0.tar.gz
.
File metadata
- Download URL: email_utilities-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5f9777f2f62ba6349b14cca6daf0ac5f78e775c8c9ac91476479395c4511059 |
|
MD5 | a0dc09d920295e42b9cef03a1698ca07 |
|
BLAKE2b-256 | 359c734873e16bb2454364dad2ce39ba25bc8b8abb5f53e6e1909297f16f895d |
File details
Details for the file email_utilities-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: email_utilities-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e32b1a208ca6b4ce0aaa431181b4cc7d9b72310cd8eda35a4cc197840f7c235 |
|
MD5 | 81564c71aa21b83cfd2d8062addf4016 |
|
BLAKE2b-256 | 2301fc8ae66c927a8c8c963d7ced94ed96b4d5c2c0e48a23323e82099c917e6b |