Metadata-Version: 2.4
Name: famapp-mailparser
Version: 0.1.0
Summary: A lightweight, secure, and standalone Python package to fetch and parse FamApp credit transaction emails.
Author: iy3k
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: beautifulsoup4>=4.10.0
Dynamic: license-file

<div align="center">
  <img src="https://capsule-render.vercel.app/api?type=waving&color=7b2cbf&height=200&section=header&text=famapp-mailparser&fontSize=40&fontColor=fff&animation=twinkling&fontAlignY=35"/>
  
  <br/>
  
  <img src="https://readme-typing-svg.herokuapp.com?font=Fira+Code&size=18&duration=3000&pause=1000&color=7B2CBF&center=true&vCenter=true&width=500&lines=Secure+Gmail+IMAP+Scraper;DKIM+%26+SPF+Signature+Verification;BeautifulSoup+Structured+Parsing" alt="Typing SVG" />
  
  <br/>

[![PyPI Version](https://img.shields.io/badge/pypi-v0.1.0-blueviolet?style=for-the-badge&logo=pypi)](https://pypi.org/)
[![Python Version](https://img.shields.io/badge/python-3.8+-brightgreen?style=for-the-badge&logo=python)](https://python.org/)
[![License](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)](https://opensource.org/licenses/MIT)

<br/>
<img src="../../assets/mailparser_banner.png" width="100%" alt="famapp-mailparser Illustration" />

</div>

---

### `>_ root@famapp:~/mailparser# ./architecture.sh`

```text
Gmail IMAP Server
   │
   ▼ [Fetch Recent]
FamAppMailFetcher
   │
   ▼ [MIME QP Decode]
verify_email_headers  ──► [Validate SPF/DKIM] ──► Genuine?
   │                                                 │
   │                                           ┌─────┴─────┐
   │                                           ▼ (Yes)     ▼ (No)
   │                                    parse_email   Discard
   ▼
Parsed Metadata Output
(amount, UTR, transaction ID, sender name, purpose, date)
```

---

### `>_ root@famapp:~/mailparser# cat features.txt`

*   **Zero-Cost Polling:** Connects directly using standard IMAP with Google App Passwords. No third-party API charges or complex cloud setups.
*   **Robust Signature Verification:** Validates email SPF and DKIM signatures to guarantee emails originate strictly from `no-reply@famapp.in`.
*   **HTML Parsing Engine:** Sequentially processes BeautifulSoup text nodes to reliably extract values regardless of custom inline CSS changes.

---

### `>_ root@famapp:~/mailparser# cat installation.txt`

```bash
pip install beautifulsoup4
```

---

### `>_ root@famapp:~/mailparser# python example.py`

```python
from famapp_mailparser import FamAppMailFetcher

fetcher = FamAppMailFetcher(
    gmail_user="your_email@gmail.com",
    gmail_password="your_app_password"
)

transactions = fetcher.fetch_recent_transactions(limit=5)
for tx in transactions:
    print(f"Verified payment of ₹{tx['amount']} from {tx['sender_name']}")
    print(f"Txn ID: {tx['txn_id']} | UTR: {tx['utr']}")
```

---

### Open Source Contribution

This project is fully open source. We encourage and welcome contributions from the community to help improve, optimize, and extend the ecosystem. Feel free to open issues or submit pull requests!

## 🪪 License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT). See the [LICENSE](https://github.com/AuraZod/Quo/blob/main/LICENSE) file for details.

---

### Contributors 👥
<a href="https://github.com/AuraZod/famapp-mailparser/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=AuraZod/famapp-mailparser" />
</a>
