Crates.io | mrml-python |
lib.rs | mrml-python |
version | 0.1.15 |
source | src |
created_at | 2023-12-19 21:00:21.317333 |
updated_at | 2024-07-03 18:29:44.30836 |
description | Python wrapping on MRML |
homepage | |
repository | https://github.com/jdrouet/mrml/ |
max_upload_size | |
id | 1074636 |
size | 22,718 |
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.
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>")