16 releases

0.2.1 Nov 16, 2025
0.2.0 Mar 1, 2025
0.1.15 Jul 3, 2024
0.1.14 Jun 13, 2024
0.1.1 Dec 20, 2023

#422 in Email

MIT license

630KB
17K SLoC

mrml-python

This project is a reimplementation of the nice MJML markup language in Rust, built for python.

To have more information, take a look at the repository.

Usage in python

import mrml

# without options
result = mrml.to_html("<mjml></mjml>")
assert result.content.startswith("<!doctype html>")

# with options
parser_options = mrml.ParserOptions(include_loader = mrml.memory_loader({
    'hello-world.mjml': '<mj-text>Hello World!</mj-text>',
}))
result = mrml.to_html("<mjml><mj-body><mj-include path=\"hello-world.mjml\" /></mj-body></mjml>", parser_options = parser_options)
assert result.content.startswith("<!doctype html>")

Dependencies

~12–24MB
~390K SLoC