12 releases

0.1.13 Apr 20, 2024
0.1.12 Apr 13, 2024
0.1.10 Mar 21, 2024
0.1.1 Dec 20, 2023

#155 in Email

Download history 19/week @ 2024-02-14 10/week @ 2024-02-21 315/week @ 2024-02-28 53/week @ 2024-03-06 300/week @ 2024-03-13 307/week @ 2024-03-20 8/week @ 2024-03-27 137/week @ 2024-04-03 165/week @ 2024-04-10 168/week @ 2024-04-17 5/week @ 2024-04-24 1/week @ 2024-05-01

339 downloads per month

MIT license

585KB
15K 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.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.startswith("<!doctype html>")

Dependencies

~6–12MB
~167K SLoC