--- id: mjml-python version: "1.4.1" license: unclear license_treatment: permissive maintenance: active --- # mjml-python — A Python wrapper for MRML (Rust port of MJML). License: permissive · Maintenance: active · Downloads: 452.3K/mo ## 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 above — verify before relying. Compiles MJML email templates to HTML at runtime using an embedded Rust engine, without requiring Node.js, external APIs, or subprocesses. 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 pip install mjml-python uv add mjml-python poetry add mjml-python ## Installing mjml-python 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. 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( 'Hello', disable_comments=True ) Requires Python 3.8 or later. 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: not declared (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 452.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags mjml email template compiler, render mjml to html python, email template engine, mjml without nodejs, responsive email builder, mjml html conversion, email markup language, email-templates, mjml, rust-binding [View on SkillFed](https://skillfed.io/packages/mjml-python) · [View on PyPI](https://pypi.org/project/mjml-python/)