--- id: mjml version: "0.12.0" license: MIT license_treatment: permissive maintenance: active --- # mjml — Python implementation for MJML - a framework that makes responsive-email easy License: permissive · Maintenance: active · Downloads: 465.2K/mo ## What it is and what it does mjml is an unofficial Python port of the MJML markup language, a framework designed to simplify writing responsive emails. It translates MJML (an XML-like dialect) directly to HTML without needing Node.js or a JavaScript runtime. The package is implemented in pure Python and can be used either as a library (via the mjml_to_html function) or as a command-line tool. The library was created to avoid deploying Node.js in production and to sidestep the security audit burden of the 220+ npm packages required by the official JavaScript implementation. It trades some feature completeness for a lightweight, Python-native alternative: it handles basic components like images, tables, and groups, but does not yet implement all MJML features (minification, beautification, validation). It is actively maintained and deployed in light production scenarios. Use it for: - Generate responsive email HTML from MJML templates in a Python web application without Node.js overhead. - Build email templates programmatically using MJML markup in Django or Flask projects. - Convert MJML files to HTML via CLI for integration into build pipelines or batch email generation. - Avoid the security and dependency audit burden of npm packages by using a pure-Python email template engine. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts MJML (a markup language for responsive emails) to HTML without requiring Node.js, using pure Python. Yes, if you need to generate responsive emails from MJML templates in Python and want to avoid Node.js. The package is actively maintained, has low install friction, carries a permissive MIT license, and has no known vulnerabilities. Be aware that it implements a subset of MJML features and lags behind the JavaScript version; check the documentation to confirm your required components are supported before committing to production use. ## Install pip install mjml uv add mjml poetry add mjml ## Installing mjml Before you install: Low friction: pure Python wheel with five common dependencies (beautifulsoup4, jinja2, dotmap, docopt-ng, typing_extensions). Actively maintained with recent releases; last commit 2026-03-30. License in practice: MIT license (permissive) — you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install mjml from mjml import mjml_to_html with open('foo.mjml', 'rb') as mjml_fp: result = mjml_to_html(mjml_fp) html: str = result.html Requires Python 3.9 or later. Verify before relying: - Feature parity with the JavaScript mjml v4 implementation — the description notes the Python version lags behind and lacks minification, beautification, and validation. - Which MJML components are currently implemented beyond 'Hello World', images, tables, and groups. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 465.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags email template markup language, mjml to html converter, responsive email generation python, email html builder, mailjet mjml python port, email-generation, markup-language [View on SkillFed](https://skillfed.io/packages/mjml) · [View on PyPI](https://pypi.org/project/mjml/)