mementoweb.apps.daily_validator package

Submodules

mementoweb.apps.daily_validator.email_client module

class mementoweb.apps.daily_validator.email_client.Email

Bases: object

Provides abstract functions of sending an email using an existing email server connection.

close()
send_email(sender: str = 'Memento Daily Validator', sender_email: str = 'daily@mementoweb.org', subject: str = 'Daily Validator Report', receiver: Union[str, List[str]] = '', html_message: str = '')

Sends an email given as a string to recipients.

Parameters
  • sender – Name of the sender (Name to appear at the recipient). Defaults to “Memento Daily Validator”.

  • sender_email

  • subject – Subject of the email. Defaults to “Daily Validator Report”.

  • receiver – List containing recipient email addresses.

  • html_message – Message needs to be sent as an HTML text.

Returns

None

exception mementoweb.apps.daily_validator.email_client.EmailServerError

Bases: Exception

class mementoweb.apps.daily_validator.email_client.SecureEmail(host='localhost', port=0, username='', password='')

Bases: mementoweb.apps.daily_validator.email_client.Email

Provides interface for establishing secure email server connections using username and password. Uses SMTP_SSL.

class mementoweb.apps.daily_validator.email_client.UnsecureEmail(host='localhost', port=0)

Bases: mementoweb.apps.daily_validator.email_client.Email

Provides interface for establishing unsecure email server connections, or local instances. Uses SMTP.

mementoweb.apps.daily_validator.email_report_generator module

class mementoweb.apps.daily_validator.email_report_generator.HTMLReportGenerator

Bases: object

Functions and methods for generating HTML report from a given Memento Validator report.

generate(test_parameters: dict, result: mementoweb.validator.pipelines.default.PipelineResult, name: str, encapsulate_html: bool = True, start_text: str = '')

mementoweb.apps.daily_validator.main module

mementoweb.apps.daily_validator.main.run(file_name='daily-validator.env')

Provides an entry point for the Daily Validator interface. Used by the command line tool or when invoked.

Parameters

file_name – File containing the configurations for the daily validator.

Returns

None

Module contents