Skip to content

foundation/inky-example-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inky Example: Python

A minimal example showing how to use the Inky email framework from Python via the ctypes bindings.

Requires Inky v2. See installation instructions.

Prerequisites

  • Python >= 3.8
  • The libinky shared library (build from source: cargo build -p inky-ffi --release)

Quick Start

pip install -r requirements.txt
python build.py

File Structure

src/emails/welcome.inky    Source template
data/welcome.json           Sample merge data
dist/                       Built output (generated)
build.py                    Build script
send.py                     Email sending example

Building

python build.py transforms the Inky template, generates a merged version with sample data, and creates a plain text version.

Sending

Edit send.py with your SMTP credentials, then:

python send.py

Uses Python's built-in smtplib. See comments in send.py for ESP alternatives.

Documentation

About

Example: Using Inky email framework with python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages