- docs(mail_intake/__init__.py): document module-based public API and usage patterns - docs(mail_intake/ingestion/reader.py): document high-level ingestion orchestration - docs(mail_intake/adapters/base.py): document adapter contract for mail providers - docs(mail_intake/adapters/gmail.py): document Gmail adapter implementation and constraints - docs(mail_intake/auth/base.py): document authentication provider contract - docs(mail_intake/auth/google.py): document Google OAuth authentication provider - docs(mail_intake/models/message.py): document canonical email message model - docs(mail_intake/models/thread.py): document canonical email thread model - docs(mail_intake/parsers/body.py): document message body extraction logic - docs(mail_intake/parsers/headers.py): document message header normalization utilities - docs(mail_intake/parsers/subject.py): document subject normalization utilities - docs(mail_intake/config.py): document global configuration model - docs(mail_intake/exceptions.py): document library exception hierarchy
31 lines
877 B
Python
31 lines
877 B
Python
"""
|
|
Message parsing utilities for Mail Intake.
|
|
|
|
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.
|
|
"""
|
|
|
|
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",
|
|
]
|