Skip to main content

Create, preview, test and upload Amazon SES templates

Maintainability

Console command to edit, test and upload amazon SES templates

Currently AWS SES has API endpoint to create email templates with handlebars syntax and API endpoint to send emails with template name and a dictionary with template variables. But it does not provide any UI to create and edit templates. This script allows you to manage your email templates from command line

Installation

pip install amazon-ses-template-editor

Usage

usage: amazon-ses-template-editor.py [-h] [-c CONFIG]
                                     {upload,test,preview} ...

positional arguments:
  {upload,test,preview}
    upload              Uploads templates from configuration file to SES using
                        your system credentials
    upload_test         Uploads templates for testing purposes
    test                Sends emails to your email address so you can test
                        layout
    preview             Starts minimal http server for email template testing

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Path to configuration file, default ./config.toml

Uploading emails

usage: amazon-ses-template-editor.py upload [-h] [-t TEMPLATE]

optional arguments:
  -h, --help            show this help message and exit
  -t TEMPLATE, --template TEMPLATE
                        Uploads only one template with given name

Testing emails

usage: amazon-ses-template-editor.py upload_test [-h] [-t TEMPLATE]

optional arguments:
  -h, --help            show this help message and exit
  -t TEMPLATE, --template TEMPLATE
                        Uploads only one template with given name


usage: amazon-ses-template-editor.py test [-h] [-t TEMPLATE]

optional arguments:
  -h, --help            show this help message and exit
  -t TEMPLATE, --template TEMPLATE
                        Uploads only one template with given name

Testing emails

Config example

[[templates]]
name = 'weekly-email'
html = "templates/weekly-email.hb2"
title = 'Your links weekly report'

[[templates]]
name = 'confirmation-email'
html = "templates/confirmation-email.hb2"
title = 'Please verify your email'

[partials]
footer = 'partials/footer.hb2'

[tests]
from = 'andrii@short.cm'
to = ['andrey@kostenko.name', 'someone_else@short.cm']

[[test]]
template = 'weekly-email'
    [test.data]
        encodedEmail = 'andrey@kostenko.name'
        [test.data.user]
        id = 12345
        name = 'Test test'
        [[test.data.domains]]
            [test.data.domains.domain]
            hostname = 'test.com'
            [test.data.domains.stats]
            links = 50
            clicks = 50
            humanClicks = 50
            [[test.data.domains.stats.device]]
            deviceName = "Desktop"
            score = 12345

Author

Andrii Kostenko, Short.cm Inc (https://short.cm)

Metadata

Release files for amazon-ses-template-editor 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for amazon-ses-template-editor 0.5.1
File Size Uploaded Provenance Actions
amazon-ses-template-editor-0.5.1.tar.gz 4.2 kB Without provenance Details for amazon-ses-template-editor-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for amazon-ses-template-editor 0.5.1
File Interpreter ABI Platform Actions
amazon_ses_template_editor-0.5.1-py3-none-any.whl Python 3 none any Details for amazon_ses_template_editor-0.5.1-py3-none-any.whl

Total release size: 21.0 kB

Release files / amazon-ses-template-editor-0.5.1.tar.gz

Download URL amazon-ses-template-editor-0.5.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
755ee1da078bcaae4c7a32b7d661b56619bb9943219c12d0573667bb5eab6c08
BLAKE2b-256 checksum
How to use checksums
e79e5334f8283fa53d7c553c5cdbf1ecfbb9d0fff0a3ad6227a14122edccb806
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3

Release files / amazon_ses_template_editor-0.5.1-py3-none-any.whl

Download URL amazon_ses_template_editor-0.5.1-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9450d4a7171c8671419d0f9598471c36714484e120db0ee236ce7f185372780e
BLAKE2b-256 checksum
How to use checksums
810eb7925d95dab8a5e3387bea3b8ee4f930ace816cf27c225b241eca4b3a88d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3

Security for amazon-ses-template-editor 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page