Metadata-Version: 2.3
Name: email-profile
Version: 0.4.0
Summary: 📩 Email Profile
Project-URL: Homepage, https://github.com/linux-profile/email-profile
Project-URL: Issues, https://github.com/linux-profile/email-profile/issues
Project-URL: Repository, https://github.com/linux-profile/email-profile
Project-URL: Documentation, https://github.com/linux-profile/email-profile/blob/master/README.md
Author-email: Fernando Celmer <email@fernandocelmer.com>
License: MIT License
        
        Copyright (c) 2024 Fernando Celmer
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# email-profile

![GitHub Org's stars](https://img.shields.io/github/stars/linux-profile?label=LinuxProfile&style=flat-square)

---

- **Documentation**: [Link](https://github.com/FernandoCelmer/email-profile)
- **Source Code**: [Link](https://github.com/FernandoCelmer/email-profile)

---

## Check list

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

## How to install?

```python
pip install email-profile
```

## Config

```python
from email_profile import Email

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

## Query instance

```python
from datetime import datetime, date

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

## Query count

```python
print(query.count())
```


## List IDs

```python
ids = query.list_id()
print(ids)
```

## List Data

```python
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.
