skillfed

mrml

A Python wrapper for MRML (Rust port of MJML).

mrml v0.2.4 1.0M downloads/30d#4,530 on PyPI504
License unclear Active released

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 mrml

uv

uv add mrml

poetry

poetry add mrml

Installing 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

Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: Rust

Tags

mjml to html conversionemail template markup languageresponsive email generationmjml parser pythonemail html buildermjml rust wrapperresponsive email templates
email-templatesmarkup-languagerust-binding

More HTML packages