Files
mail-intake/mail_intake/parsers/__init__.py

46 lines
996 B
Python

"""
Message parsing utilities for Mail Intake.
---
## Summary
This package contains **provider-aware but adapter-agnostic parsing helpers**
used to extract and normalize structured information from raw mail payloads.
Parsers in this package are responsible for:
- Interpreting provider-native message structures
- Extracting meaningful fields such as headers, body text, and subjects
- Normalizing data into consistent internal representations
This package does not:
- Perform network or IO operations
- Contain provider API logic
- Construct domain models directly
Parsing functions are designed to be composable and are orchestrated by the
ingestion layer.
---
## Public API
extract_body
parse_headers
extract_sender
normalize_subject
---
"""
from .body import extract_body
from .headers import parse_headers, extract_sender
from .subject import normalize_subject
__all__ = [
"extract_body",
"parse_headers",
"extract_sender",
"normalize_subject",
]