Skip to content

Commit

Permalink
doc(mrml-python): update readme
Browse files Browse the repository at this point in the history
Signed-off-by: Jérémie Drouet <[email protected]>
  • Loading branch information
jdrouet committed Dec 7, 2023
1 parent cc82dd6 commit f9c384f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/mrml-python/readme.md
Original file line number Diff line number Diff line change
@@ -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("<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>")
```

0 comments on commit f9c384f

Please sign in to comment.