email-profile

πŸ“© Email Profile


License
Other
Install
pip install email-profile==0.1.0

Documentation

email-profile

GitHub Org's stars



Check list

  • Query API Structure
    • Mailbox
    • Since
    • Before
    • Subject
    • From Who
    • Body
    • Unseen
  • Data table structure
  • Get emails
  • Download Attachments
  • Response JSON
  • Dump File JSON
  • Response HTML
  • Dump File HTML
  • Response Attachment File
  • Dump Attachment File
  • CLI Email
  • Documentation

How to install?

pip install email-profile

Config

from email_profile import Email

def main():
    app = Email(
        server="EMAIL-SERVER"
        user="EMAIL_USERNAME",
        password="EMAIL_PASSWORD"
    )

Query instance

from datetime import datetime, date

query = app.select(mailbox="Inbox").where(
    since=datetime(1996, 5, 31),
    before=date.today(),
    subject='abc'
)

Query count

print(query.count())

List IDs

ids = query.list_id()
print(ids)

List Data

data = query.list_data()

for content in data:
    # Email data model
    print(content.email.subject)

    # Attachments data model
    print(content.attachments)

    # Dump Json
    json = content.json()
    print(json)

    # Dump HMTL
    html = content.html()
    print(html)

Commit Style

  • βš™οΈ FEATURE
  • πŸ“ PEP8
  • πŸ“Œ ISSUE
  • πŸͺ² BUG
  • πŸ“˜ DOCS
  • πŸ“¦ PyPI
  • ❀️️ TEST
  • ⬆️ CI/CD
  • ⚠️ SECURITY

License

This project is licensed under the terms of the MIT license.