Skip to content

parsedmarc.source.email 🔗

Google 🔗

Google(
    name: str = "default",
    parser: ReportParser | None = None,
    config: dict[str, Any] | None = None,
)

Bases: MailboxConnectionSource

Source for connecting to Google accounts using the Google API.

Supports both Gmail and Google Workspace accounts.

New in 9.0.

PARAMETER DESCRIPTION
name

profile name for this instance, ideally should be unqiue to easily idenfity this instance and any log messages it produces

TYPE: str DEFAULT: 'default'

parser

parser to use when generating reports

TYPE: ReportParser | None DEFAULT: None

config

config for this instance

TYPE: dict[str, Any] | None DEFAULT: None

outstanding_jobs property 🔗

outstanding_jobs: MappingProxyType[str, Job]

Read only view of outstanding jobs

state property 🔗

state: AppState

Read only Source state

cleanup 🔗

cleanup() -> None

Perform cleanup on this source.

This method is called as a part of self.shutdown.

Child classes can override this method to implement their own logic. It is still recomended to call super().cleanup().

register_job 🔗

register_job(job: Job) -> None

Register a job to this source so we can keep track of it

PARAMETER DESCRIPTION
job

the job to register

TYPE: Job

shutdown 🔗

shutdown(
    timeout: int | float = 120, force: bool = False
) -> None

Attempt to gracefully shutdown this source.

PARAMETER DESCRIPTION
timeout

Giveup after this many seonds (TODO)

TYPE: int | float DEFAULT: 120

force

If a timeout would occur, instead force shutdown.

TYPE: bool DEFAULT: False

validate_config 🔗

validate_config() -> None

Validate the config of this instance

Child classes can override this method to implement their own logic. It is still recomended to call super().validate_config().

GoogleConfig 🔗

Bases: MailboxConfig

Google Config

New in 9.0.

Imap 🔗

Imap(
    name: str = "default",
    parser: ReportParser | None = None,
    config: dict[str, Any] | None = None,
)

Bases: MailboxConnectionSource

Source that collects emails using IMAP

New in 9.0.

PARAMETER DESCRIPTION
name

profile name for this instance, ideally should be unqiue to easily idenfity this instance and any log messages it produces

TYPE: str DEFAULT: 'default'

parser

parser to use when generating reports

TYPE: ReportParser | None DEFAULT: None

config

config for this instance

TYPE: dict[str, Any] | None DEFAULT: None

outstanding_jobs property 🔗

outstanding_jobs: MappingProxyType[str, Job]

Read only view of outstanding jobs

state property 🔗

state: AppState

Read only Source state

cleanup 🔗

cleanup() -> None

Perform cleanup on this source.

This method is called as a part of self.shutdown.

Child classes can override this method to implement their own logic. It is still recomended to call super().cleanup().

register_job 🔗

register_job(job: Job) -> None

Register a job to this source so we can keep track of it

PARAMETER DESCRIPTION
job

the job to register

TYPE: Job

shutdown 🔗

shutdown(
    timeout: int | float = 120, force: bool = False
) -> None

Attempt to gracefully shutdown this source.

PARAMETER DESCRIPTION
timeout

Giveup after this many seonds (TODO)

TYPE: int | float DEFAULT: 120

force

If a timeout would occur, instead force shutdown.

TYPE: bool DEFAULT: False

validate_config 🔗

validate_config() -> None

Validate the config of this instance

Child classes can override this method to implement their own logic. It is still recomended to call super().validate_config().

ImapConfig 🔗

Bases: MailboxConfig

IMAP Config

New in 9.0.

MailboxConfig 🔗

Bases: BaseConfig

Mailbox Config

New in 9.0.

MailboxConnectionSource 🔗

MailboxConnectionSource(
    name: str = "default",
    parser: ReportParser | None = None,
    config: dict[str, Any] | None = None,
)

Bases: Source

Base class for MailboxConnection based sources

Child classes MUST set the self.mailbox attribute.

New in 9.0.

PARAMETER DESCRIPTION
name

profile name for this instance, ideally should be unqiue to easily idenfity this instance and any log messages it produces

TYPE: str DEFAULT: 'default'

parser

parser to use when generating reports

TYPE: ReportParser | None DEFAULT: None

config

config for this instance

TYPE: dict[str, Any] | None DEFAULT: None

outstanding_jobs property 🔗

outstanding_jobs: MappingProxyType[str, Job]

Read only view of outstanding jobs

state property 🔗

state: AppState

Read only Source state

cleanup 🔗

cleanup() -> None

Perform cleanup on this source.

This method is called as a part of self.shutdown.

Child classes can override this method to implement their own logic. It is still recomended to call super().cleanup().

register_job 🔗

register_job(job: Job) -> None

Register a job to this source so we can keep track of it

PARAMETER DESCRIPTION
job

the job to register

TYPE: Job

shutdown 🔗

shutdown(
    timeout: int | float = 120, force: bool = False
) -> None

Attempt to gracefully shutdown this source.

PARAMETER DESCRIPTION
timeout

Giveup after this many seonds (TODO)

TYPE: int | float DEFAULT: 120

force

If a timeout would occur, instead force shutdown.

TYPE: bool DEFAULT: False

validate_config 🔗

validate_config() -> None

Validate the config of this instance

Child classes can override this method to implement their own logic. It is still recomended to call super().validate_config().

MicrosoftGraph 🔗

MicrosoftGraph(
    name: str = "default",
    parser: ReportParser | None = None,
    config: dict[str, Any] | None = None,
)

Bases: MailboxConnectionSource

Source for connecting to Micosoft accounts using the Graph API.

New in 9.0.

PARAMETER DESCRIPTION
name

profile name for this instance, ideally should be unqiue to easily idenfity this instance and any log messages it produces

TYPE: str DEFAULT: 'default'

parser

parser to use when generating reports

TYPE: ReportParser | None DEFAULT: None

config

config for this instance

TYPE: dict[str, Any] | None DEFAULT: None

outstanding_jobs property 🔗

outstanding_jobs: MappingProxyType[str, Job]

Read only view of outstanding jobs

state property 🔗

state: AppState

Read only Source state

cleanup 🔗

cleanup() -> None

Perform cleanup on this source.

This method is called as a part of self.shutdown.

Child classes can override this method to implement their own logic. It is still recomended to call super().cleanup().

register_job 🔗

register_job(job: Job) -> None

Register a job to this source so we can keep track of it

PARAMETER DESCRIPTION
job

the job to register

TYPE: Job

shutdown 🔗

shutdown(
    timeout: int | float = 120, force: bool = False
) -> None

Attempt to gracefully shutdown this source.

PARAMETER DESCRIPTION
timeout

Giveup after this many seonds (TODO)

TYPE: int | float DEFAULT: 120

force

If a timeout would occur, instead force shutdown.

TYPE: bool DEFAULT: False

MicrosoftGraphConfig 🔗

Bases: MailboxConfig

MicrosoftGraph Config

New in 9.0.