mrml
A Python wrapper for MRML (Rust port of MJML).
What it is and what it does
mrml is a Python wrapper around a Rust reimplementation of MJML, a markup language designed for building responsive email templates. It translates MJML syntax into production-ready HTML, handling the complexity of email client compatibility so developers don't have to. The package has no runtime dependencies and exposes a simple API: pass MJML markup to `to_html()` and receive HTML output. It supports advanced features like file includes via a pluggable loader system, allowing you to compose templates from separate files or in-memory sources.
The package is built on compiled Rust bindings, which means installation requires platform-specific wheels rather than pure Python code. Wheels are provided for common architectures (x86_64, ARM, PowerPC, s390x on Linux; x86_64 and ARM on macOS; x86_64 on Windows) and Python versions 3.10–3.12, with declared support back to Python 3.7. The project is actively maintained, with recent commits and no known security vulnerabilities.
Use it for:
- Generate responsive email HTML from MJML markup without manually handling email client quirks.
- Build email template systems that compose reusable MJML components via includes.
- Convert MJML designs to production HTML in CI/CD pipelines or backend services.
- Prototype responsive emails quickly using MJML's higher-level syntax instead of raw HTML.
- Integrate email template rendering into Python web frameworks or batch email services.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts MJML (a markup language for responsive emails) to HTML using a Rust-based implementation, with support for includes and custom parsing options.
Yes, if you need to convert MJML to HTML and can tolerate medium install friction from compiled bindings. The package is actively maintained, has no security issues, and offers a clean API with no runtime dependencies. The main caveat is the unclear license status—verify licensing terms before adopting in proprietary projects. Installation should be straightforward on common platforms thanks to pre-built wheels.
Install
mrml on PyPI
pip
pip install mrmluv
uv add mrmlpoetry
poetry add mrmlInstalling mrml
Before you install
Medium install friction due to compiled Rust bindings, but wheels are available for common platforms (x86_64, ARM, Windows, macOS). Package is actively maintained with recent releases and no known vulnerabilities.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license before using in proprietary or restricted contexts.
Quickstart
import mrml
result = mrml.to_html("<mj-body><mj-text>Hello</mj-text></mj-body>")
print(result.content)
Requires Python 3.7 or later; compiled wheels available for most platforms but may require compilation on unsupported architectures.
Verify before relying
- Whether the package includes documentation or examples beyond the GitHub repository.
- Exact license terms and compatibility with common open-source and proprietary workflows.
- Performance characteristics and limits for large or complex MJML templates.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 111 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,005,266/month — #4,530 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mrml-0.2.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; mrml-0.2.4-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl; mrml-0.2.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; mrml-0.2.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl; mrml-0.2.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; mrml-0.2.4-cp310-cp310-manylinux_2_28_aarch64.whl; mrml-0.2.4-cp310-cp310-win_amd64.whl; mrml-0.2.4-cp311-cp311-macosx_10_12_x86_64.whl; mrml-0.2.4-cp311-cp311-macosx_11_0_arm64.whl; mrml-0.2.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; mrml-0.2.4-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl; mrml-0.2.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; mrml-0.2.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl; mrml-0.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; mrml-0.2.4-cp311-cp311-manylinux_2_28_aarch64.whl; mrml-0.2.4-cp311-cp311-win_amd64.whl; mrml-0.2.4-cp312-cp312-macosx_10_12_x86_64.whl; mrml-0.2.4-cp312-cp312-macosx_11_0_arm64.whl; mrml-0.2.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; mrml-0.2.4-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Tags
More HTML packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
lxmllxml provides Python bindings to libxml2 and…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
MarkdownConverts Markdown text to HTML using a Python…
permissive · top 1,000 on PyPI
mjml-pythonCompiles MJML email templates to HTML at…
permissive · top 15,000 on PyPI
mjmlConverts MJML (a markup language for responsive…
permissive · top 15,000 on PyPI
django-mjmlProvides a Django template tag that compiles…
permissive · top 15,000 on PyPI
html5taggerGenerates HTML5 markup programmatically using…
permissive · top 5,000 on PyPI
email-toWraps Python's standard email modules to…
permissive · top 15,000 on PyPI
css-inlineInlines CSS from style and link tags directly…
permissive · top 5,000 on PyPI
tinyhtmlRenders HTML5 safely from Python expressions…
permissive · top 15,000 on PyPI
htmlBuilderRender HTML by writing Python code, using…
permissive · top 15,000 on PyPI
cohere-melodyParses and renders templated text for Cohere…
permissive · top 15,000 on PyPI