From f9c384f7863b49201aa5699bdafc2d398e6ff01e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Drouet?= Date: Thu, 7 Dec 2023 11:32:24 +0100 Subject: [PATCH] doc(mrml-python): update readme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Drouet --- packages/mrml-python/readme.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/mrml-python/readme.md b/packages/mrml-python/readme.md index fc957cc3..5eac2bda 100644 --- a/packages/mrml-python/readme.md +++ b/packages/mrml-python/readme.md @@ -1 +1,22 @@ # 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](https://github.com/jdrouet/mrml). + +## Usage in python + +```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("") +```