mjml-python
A Python wrapper for MRML (Rust port of MJML).
Decision gist · record as of 2026-08-14
Yes, if you need to render MJML templates in Python without Node.js or external services. The package is actively maintained, has no known vulnerabilities, uses a permissive license, and ships pre-built wheels for standard platforms. The medium install friction is acceptable given the elimination of subprocess or API overhead. Not necessary if you're already using a Node.js-based MJML workflow or don't need MJML's specific template syntax.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- Medium friction due to compiled wheels, but ABI-3 wheels are pre-built for CPython 3.8+ across major platforms (macOS x86_64/arm64, Linux x86_64/aarch64, Windows), so no compilation is required on typical environments.
- Active maintenance with a recent release.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) means you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.
last release 2026-06-30 (45 days) · last repo commit 2026-06-30 · 108 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 452,303 downloads/mo, #6,582 on PyPI
Alternatives
Verify before relying
from mjml import mjml2html
html = mjml2html(
'<mj-body><mj-section><mj-column><mj-text>Hello</mj-text></mj-column></mj-section></mj-body>',
disable_comments=True
)- Whether the embedded Rust engine maintains full compatibility with the official MJML specification across all template features.
- Performance characteristics and memory usage in production workloads compared to the Node.js baseline mentioned in the description.
What it is and what it does
mjml-python wraps the MRML Rust engine to compile MJML (Mailjet Markup Language) email templates directly to HTML within Python, eliminating the need for Node.js, external APIs, or subprocess calls. It ships as pre-built wheels for modern Python versions and major platforms, so installation is straightforward on typical systems.
The package provides a single `mjml2html()` function that accepts MJML markup and optional configuration (fonts, comment stripping, custom icon origins, and include loaders for template composition). It's designed for straightforward use cases—render MJML input to production-ready HTML—without exposing the full MRML configuration surface. No runtime dependencies are required beyond Python itself.
Use it for
- Generate responsive email HTML from MJML templates in Django or Flask applications without spawning Node.js processes.
- Batch-render email templates in data pipelines or background jobs where subprocess overhead or external API latency is unacceptable.
- Embed MJML compilation directly in email-sending workflows, with custom include loaders to fetch templates from databases or HTTP sources.
- Build email template systems where you want MJML's responsive component model but need the performance and memory efficiency of a compiled engine.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to render MJML templates in Python without Node.js or external services.
The package is actively maintained, has no known vulnerabilities, uses a permissive license, and ships pre-built wheels for standard platforms. The medium install friction is acceptable given the elimination of subprocess or API overhead. Not necessary if you're already using a Node.js-based MJML workflow or don't need MJML's specific template syntax.
Install
mjml-python on PyPI
Before you install
Medium friction due to compiled wheels, but ABI-3 wheels are pre-built for CPython 3.8+ across major platforms (macOS x86_64/arm64, Linux x86_64/aarch64, Windows), so no compilation is required on typical environments. Active maintenance with a recent release.
Requires Python 3.8 or later.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.
Quickstart
from mjml import mjml2html
html = mjml2html(
'<mj-body><mj-section><mj-column><mj-text>Hello</mj-text></mj-column></mj-section></mj-body>',
disable_comments=True
)
Verify before relying
- Whether the embedded Rust engine maintains full compatibility with the official MJML specification across all template features.
- Performance characteristics and memory usage in production workloads compared to the Node.js baseline mentioned in the description.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 45 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 452,303 / month, #6,582 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: Rust |
Evidence: mjml_python-1.4.1-cp38-abi3-macosx_10_12_x86_64.whl; mjml_python-1.4.1-cp38-abi3-macosx_11_0_arm64.whl; mjml_python-1.4.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; mjml_python-1.4.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; mjml_python-1.4.1-cp38-abi3-musllinux_1_2_aarch64.whl; mjml_python-1.4.1-cp38-abi3-musllinux_1_2_x86_64.whl; mjml_python-1.4.1-cp38-abi3-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “render mjml to html python”
- mjml-pythonCompiles MJML email templates to HTML at runtime using an embedded…
- django-mjmlProvides a Django template tag that compiles MJML (Mailjet Markup…
- mjmlConverts MJML (a markup language for responsive emails) to HTML…
Give your agent the search over MCP, or paste the wish link into any chat.
More HTML packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.
Install it if you need to parse or extract data from markup documents.
lxml provides Python bindings to libxml2 and libxslt, enabling parsing, validation, and transformation of XML and HTML documents through an ElementTree-compatible API with support for XPath, XSLT, and schema validation.
Install it if you need robust XML/HTML parsing, validation, or transformation; avoid it only if you must stay pure-Python and can accept slower performance.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
Converts Markdown text to HTML using a Python implementation of John Gruber's Markdown specification, with support for extensions.
Install it if you need to parse Markdown in Python.
See also mjml · mrml · django-mjml · htbuilder · emails · django-post_office · minify-html · django-sendgrid-v5 · hyperscript · html5tagger