Skip to main content

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(), and render_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 begin
  • Quickstart: first working email and Jinja-safe rendering
  • Core Concepts: document shell, sections, primitives, themes, and templates
  • Recipes: common paths like marketing, newsletter, promo, and ecommerce emails
  • Examples: curated previews grouped by use case
  • Reference: generated component, template, and theme reference

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyzahidal-0.1.5.tar.gz (37.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyzahidal-0.1.5-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

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

Hashes for pyzahidal-0.1.5.tar.gz
Algorithm Hash digest
SHA256 00cf44fa9054d58d418690736a53de6f268a81af1ddd19b1d6aa7d97f091fea3
MD5 e049ce1bb166d29b1f5030534c186dce
BLAKE2b-256 505411773648aebbc58de0c2832ba088f5c480e4d99870cb2a21308943c78e6f

See more details on using hashes here.

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

Hashes for pyzahidal-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 041e272151db74446e6b5167e316af51f4d7b778dd3ee0a43d4d7472922b2b7d
MD5 c24677cff7ddfb8a0adf3d06d5477654
BLAKE2b-256 beed34044d99ae0aa2b8eecb8b739efdd682c3008338f1fa20907d8f296047e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page