from emailer_lib.mjml import mjml, text
child = text("Hello World")
result = mjml(child)mjml.mjml
mjml.mjml(*args, attributes=None, content=None)Create an MJML <mjml> tag.
Parameters
*args : TagChild = ()-
Children (MJMLTag objects)
attributes : Optional[TagAttrs] = None-
Optional dict of tag attributes
content : Optional[str] = None-
Optional text content for the tag
Returns
: MJMLTag-
MJMLTag object representing
<mjml>
Examples
With children:
With attributes:
result = mjml(attributes={"attr": "value"})With both:
result = mjml(child, attributes={"background-color": "yellow"})