14 releases

0.1.15 Jul 3, 2024
0.1.14 Jun 13, 2024
0.1.13 Apr 20, 2024
0.1.10 Mar 21, 2024
0.1.1 Dec 20, 2023

#183 in Email

Download history 20/week @ 2024-03-29 129/week @ 2024-04-05 165/week @ 2024-04-12 166/week @ 2024-04-19 4/week @ 2024-04-26 3/week @ 2024-05-17 2/week @ 2024-05-24 76/week @ 2024-06-07 54/week @ 2024-06-14 5/week @ 2024-06-21 93/week @ 2024-06-28 21/week @ 2024-07-05

120 downloads per month

MIT license

620KB
16K 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
~153K SLoC