Files
mail-intake/mail_intake/config.py
Vishesh 'ironeagle' Bangotra 371b74806f chore(release): 0.0.3
Squash-merge lib-standardisation: adopt repo standards across packaging,
tooling, docs, and CI.

- standardize pyproject.toml (canonical packaging, lint config, extras, GSDFC pydoclint)
- add py.typed marker, modernize type hints and Google-style docstrings
- nest generated docs under docs/lib and docs/mcp; add hand-written wiki
- adopt standard Type A PyPI CI pipeline (tag==version guard + quality gate)
- promote generated CHANGELOG.md; bump version to 0.0.3
2026-10-17 02:16:46 +05:30

57 lines
1.4 KiB
Python

"""
# Summary
Global configuration models for Mail Intake.
This module defines the **top-level configuration object** used to control
mail ingestion behavior across adapters, authentication providers, and
ingestion workflows.
Configuration is intentionally explicit, immutable, and free of implicit
environment reads to ensure predictability and testability.
"""
from dataclasses import dataclass
@dataclass(frozen=True)
class MailIntakeConfig:
"""
Global configuration for `mail-intake`.
Notes:
**Guarantees:**
- This configuration is intentionally explicit and immutable.
- No implicit environment reads or global state.
- Explicit configuration over implicit defaults.
- No direct environment or filesystem access.
- This model is safe to pass across layers and suitable for
serialization.
"""
provider: str = "gmail"
"""
Identifier of the mail provider to use (e.g., ``"gmail"``).
"""
user_id: str = "me"
"""
Provider-specific user identifier. Defaults to the authenticated user.
"""
readonly: bool = True
"""
Whether ingestion should operate in read-only mode.
"""
credentials_path: str | None = None
"""
Optional path to provider credentials configuration.
"""
token_path: str | None = None
"""
Optional path to persisted authentication tokens.
"""