Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hyzyla/jinja2_mjml
Jinja2 integration with MJML
https://github.com/hyzyla/jinja2_mjml
Last synced: 14 days ago
JSON representation
Jinja2 integration with MJML
- Host: GitHub
- URL: https://github.com/hyzyla/jinja2_mjml
- Owner: hyzyla
- License: mit
- Created: 2023-01-31T18:43:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-31T18:53:45.000Z (about 2 years ago)
- Last Synced: 2025-01-16T03:19:30.172Z (16 days ago)
- Language: Python
- Size: 10.7 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Jinja2 MJML
Micro-package that integrates [MJML](https://mjml.io/)
with [Jinja2](https://jinja.palletsprojects.com/en/2.11.x/).Under the hood it uses [mjml_python](https://pypi.org/project/mjml-python/)
package, that is a wrapper around [rust port](https://github.com/jolimail/mrml-core)
of MJML.## Example
```python
from jinja2_mjml import Environment# MJMLEnvironment it's thin wrapper around jinja2.Environment,
# so you can use all the features of Jinja2 package.
environment = Environment()
template = environment.from_string('''
Hello {{ name }}!
''')# Render MJML template to HTML
print(template.render(name='MJML'))
```