Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Python library to parse and format email threads

License

Notifications You must be signed in to change notification settings

emersion/python-emailthreads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emailthreads

builds.sr.ht status

Python library to parse and format email threads. Give it a list of emails that are part of the same thread and it'll build a tree of responses to the original message.

import emailthreads
import mailbox

mbox = mailbox.mbox("/path/to/mbox/thread")
thread = emailthreads.parse(mbox)
print(thread)

Tests

To run the tests, execute this command:

python3 -m pytest test

Given some raw messages, you can parse a thread from the CLI like so:

python3 -m emailthreads *.eml

License

MIT

About

Python library to parse and format email threads

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages