diff --git a/packages/mrml-core/src/lib.rs b/packages/mrml-core/src/lib.rs index 872a5d91..14a0299e 100644 --- a/packages/mrml-core/src/lib.rs +++ b/packages/mrml-core/src/lib.rs @@ -91,6 +91,26 @@ //! # }) //! ``` //! +//! ## Using `mrml` in Python +//! +//! This crate can also be used in Python. The crate is available with pypi and +//! you can find some documentation [here](https://pypi.org/project/mrml/). +//! +//! ```python +//! import mrml +//! +//! # without options +//! result = mrml.to_html("") +//! assert result.startswith("") +//! +//! # with options +//! parser_options = mrml.ParserOptions(include_loader = mrml.memory_loader({ +//! 'hello-world.mjml': 'Hello World!', +//! })) +//! result = mrml.to_html("", parser_options = parser_options) +//! assert result.startswith("") +//! ``` +//! //! # Why? //! //! A Node.js server rendering an MJML template takes around **20 MB** of RAM at