How cds-snc/notification-utils works
notifications-utils is a shared Python library for Notification, not a standalone message-sending service. Its central workflow is to validate and normalize recipient data, personalize and format message templates, and provide rendered outputs to consuming applications; email samples exercise that rendering capability. Separate utilities support billing rates, logging, concurrency, status checks, and external clients. The graph reflects documented and indexed references; unsampled modules are included where they represent substantial capabilities, but their internal call relationships are not inferred.
Main entry points: template.py Message templates · recipients.py CSV recipients · formatters.py Text formatters · generate.py Sample email renderer
Components 22
Message content
- Message templates
notifications_utils/template.py - Personalisation fields
notifications_utils/field.py - Text formatters
notifications_utils/formatters.py - Text sanitisation
notifications_utils/sanitise_text.py - HTML validation
notifications_utils/validate_html.py - Email assets
notifications_utils/email_assets.py - Date format codes
notifications_utils/strftime_codes.py - Template comparison
notifications_utils/template_change.py
Recipient data
- CSV recipients
notifications_utils/recipients.py - Rows and columns
notifications_utils/columns.py - International billing rates
notifications_utils/international_billing_rates.py
Shared services
- Redis client
notifications_utils/clients/redis/redis_client.py - Annual limits
notifications_utils/clients/redis/annual_limit.py - Bounce rate
notifications_utils/clients/redis/bounce_rate.py - Logging utilities
notifications_utils/logging.py - Parallel execution
notifications_utils/parallel.py - Antivirus client
notifications_utils/clients/antivirus/antivirus_client.py - StatsD client
notifications_utils/clients/statsd/statsd_client.py - Zendesk client
notifications_utils/clients/zendesk/zendesk_client.py
Email samples
- Sample definitions
scripts/email_samples/samples.py - Sample email renderer
scripts/email_samples/generate.py
Other components
- Notification applications
Connections 22
- Notification applications → CSV recipients: provide recipient data
README.md - Notification applications → Message templates: use shared templates
README.md - Personalisation fields → Rows and columns: normalizes columns
notifications_utils/field.py - Personalisation fields → Text formatters: uses formatters
notifications_utils/field.py - Text formatters → Text sanitisation: uses sanitisation
notifications_utils/formatters.py - CSV recipients → Rows and columns: normalizes row data
notifications_utils/recipients.py - CSV recipients → Text formatters: uses formatters
notifications_utils/recipients.py - CSV recipients → International billing rates: uses billing rates
notifications_utils/recipients.py - CSV recipients → Message templates: checks template data
notifications_utils/recipients.py - Message templates → Personalisation fields: personalizes content
notifications_utils/template.py - Message templates → Rows and columns: uses column helpers
notifications_utils/template.py - Message templates → Text formatters: formats content
notifications_utils/template.py - Message templates → Text sanitisation: sanitizes content
notifications_utils/template.py - Message templates → HTML validation: validates HTML
notifications_utils/template.py - Message templates → Email assets: uses email assets
notifications_utils/template.py - Message templates → Date format codes: uses date codes
notifications_utils/template.py - Message templates → Template comparison: compares templates
notifications_utils/template.py - Annual limits → Redis client: stores limit data
notifications_utils/clients/redis/annual_limit.py - Bounce rate → Redis client: stores bounce data
notifications_utils/clients/redis/bounce_rate.py - Sample email renderer → Sample definitions: renders definitions
scripts/email_samples/generate.py - Sample email renderer → Message templates: renders templates
scripts/email_samples/generate.py - Sample email renderer → Email assets: embeds local assets
scripts/email_samples/generate.py