All those emails
Project description
siriusmail
For all those mails
✨ Highlight
✔️ Email parser for both outlook .msg files and regular .eml files
✔️ Use our built in rtf regex parser to remove rtf tags or use your own
📦️ Installation
pip install siriusmail
📝 Examples
from siriusmail.parser import ParseEmail
from siriusmail.rtf_extractor import remove_rtf
FILE = r"INPUT_FILEPATH"
OUT = r"OUTPUT_FILEPATH"
ENCODING = "encoding" # optional, you may specify if you are aware of the encoding being used, else chardet will try to guess
# 3 retrieval options here - body, text or attachments
msg = ParseEmail(FILE).process_streams("body", encoding=ENCODING)
msg = ParseEmail(FILE).process_streams("text")
msg = ParseEmail(FILE).process_streams("attachments", filepath=OUT)
# use our simple regex extractor to remove rtf tags
ADDITIONAL_TAGS = [r"(\\+pard)", r"(\\+pard1)",] # optional, we are definitely missing rtf tags since this is a "hardcoded" solution, add more tags or raise an issue!
msg = remove_rtf(msg, extra_tags=ADDITIONAL_TAGS)
🚀 Releases and To-Dos
- Make RTF deencapsulation more robust
- Add test for specific emails [not available at the moment due to personal emails]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
siriusmail-0.0.1.tar.gz
(6.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file siriusmail-0.0.1.tar.gz.
File metadata
- Download URL: siriusmail-0.0.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db2b7a11bd2cee5d3ae83df24985f3ff854fe68f255745ec9fdd1d9c4fe1f87d
|
|
| MD5 |
25bced42bbc76953c8bcd58a9a485755
|
|
| BLAKE2b-256 |
267c78f966bc3e38f1dc08e234da86555136bd7ff0fee734284359c44bf18e60
|
File details
Details for the file siriusmail-0.0.1-py3-none-any.whl.
File metadata
- Download URL: siriusmail-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
227ec10d8f2ffb9e435a86ad54576d87de296706c14515a0bfcdbb5b81ba9db3
|
|
| MD5 |
e5672ad8a1ffe8a19324a603966f744e
|
|
| BLAKE2b-256 |
0ee73bd1db943f7acf6fbb586d54b78d9d520f40836a58a0f541890aa6f1401c
|