12 releases

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

#182 in Email

Download history 17/week @ 2024-02-10 5/week @ 2024-02-17 148/week @ 2024-02-24 198/week @ 2024-03-02 110/week @ 2024-03-09 473/week @ 2024-03-16 53/week @ 2024-03-23 110/week @ 2024-03-30 34/week @ 2024-04-06

682 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–13MB
~167K SLoC