Composable HTML email components and templates with Jinja-friendly output.
Project description
pyzahidal
Composable Python components for building HTML emails with Jinja-friendly output.
pyzahidal is designed for teams that want reusable email building blocks instead of maintaining large hand-written HTML templates.
What you get
- Email-safe primitives such as sections, stacks, columns, buttons, tables, alerts, avatars, and spacing
- Reusable sections such as heroes, pricing, blog lists, product lists, carts, order summaries, and footers
- Starter templates for common marketing, editorial, promotion, product, and order flows
- Theme presets with token overrides
- Jinja-friendly rendering via
raw(),jinja(), andrender_template()
Install
From PyPI:
pip install pyzahidal
From a checkout:
pip install -e .
Or run directly from the repository:
PYTHONPATH=src python your_script.py
First example
from pyzahidal import ActionSpec, EmailDocument, Hero
email = EmailDocument(
preview_text="Composable emails with Jinja output",
sections=[
Hero(
eyebrow="Launch week",
title="Build emails from reusable sections",
body="Start with a document shell, add sections, then customize only what you need.",
primary_action=ActionSpec("Explore", href="https://example.com/docs"),
)
]
)
html = email.render()
html is a complete HTML email document.
When you want template expressions preserved, use raw(), jinja(), and render_template().
Documentation
The docs are organized for first-time users first:
Start Here: library overview and where to beginQuickstart: first working email and Jinja-safe renderingCore Concepts: document shell, sections, primitives, themes, and templatesRecipes: common paths like marketing, newsletter, promo, and ecommerce emailsExamples: curated previews grouped by use caseReference: generated component, template, and theme reference
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyzahidal-0.1.5.tar.gz.
File metadata
- Download URL: pyzahidal-0.1.5.tar.gz
- Upload date:
- Size: 37.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00cf44fa9054d58d418690736a53de6f268a81af1ddd19b1d6aa7d97f091fea3
|
|
| MD5 |
e049ce1bb166d29b1f5030534c186dce
|
|
| BLAKE2b-256 |
505411773648aebbc58de0c2832ba088f5c480e4d99870cb2a21308943c78e6f
|
File details
Details for the file pyzahidal-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pyzahidal-0.1.5-py3-none-any.whl
- Upload date:
- Size: 27.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
041e272151db74446e6b5167e316af51f4d7b778dd3ee0a43d4d7472922b2b7d
|
|
| MD5 |
c24677cff7ddfb8a0adf3d06d5477654
|
|
| BLAKE2b-256 |
beed34044d99ae0aa2b8eecb8b739efdd682c3008338f1fa20907d8f296047e3
|