Skip to main content

Jinja2 MJML

Micro-package that integrates MJML with Jinja2.

Under the hood it uses mjml_python package, that is a wrapper around rust port of MJML.

Example

from jinja2_mjml import Environment

# MJMLEnvironment it's thin wrapper around jinja2.Environment,
# so you can use all the features of Jinja2 package.
environment = Environment()
template = environment.from_string('''
    <mjml>
      <mj-body>
        <mj-section>
          <mj-column>
            <mj-text>Hello {{ name }}!</mj-text>
          </mj-column>
        </mj-section>
      </mj-body>
    </mjml>
''')

# Render MJML template to HTML
print(template.render(name='MJML'))

Metadata

Release files for jinja2-mjml 0.1.0

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

Source distribution (sdist)

Source distribution for jinja2-mjml 0.1.0
File Size Uploaded
jinja2_mjml-0.1.0.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jinja2-mjml 0.1.0
File Interpreter ABI Platform
jinja2_mjml-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / jinja2_mjml-0.1.0.tar.gz

Download URL jinja2_mjml-0.1.0.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
400535fd22efc593c211b6d0ffbab6463eb70b0d6a03bbc1fabdb33a10db1c61
BLAKE2b-256 checksum
How to use checksums
0225816e3caa703a63cd71e30b1cc0e89d1e7a6d74f86450fd31064eec20d9f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.10.1 Darwin/22.1.0

Release files / jinja2_mjml-0.1.0-py3-none-any.whl

Download URL jinja2_mjml-0.1.0-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fdd8f40343e3c0856377f8fda058438b45065401f9ad99cc52387b2fda23ff3f
BLAKE2b-256 checksum
How to use checksums
8f2b057fcf32a65a456a06e7f24addffd5a02f007092da9436eac8348ecca2ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.10.1 Darwin/22.1.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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