![]() ![]() CPython uses ~70ms to translate a trivial mjml template to HTML while Node.JS needs ~650ms. As the startup overhead of CPython is much lower than Node.js we can also generate a few mails via CLI applications without massive performance problems. Currently the library is deployed in some light production scenarios.Īnother benefit of using Python is that we can integrate that in our web apps more closely. MJML's API offering).Īfter a short spike to check the viability of a Python implementation I went ahead and wrote enough code to ensure some existing messages could be converted to mjml. ![]() ![]() Also due to data-privacy concerns we were unable to use any third-party products (i.e. We did not feel comfortable auditing all 220 JS packages which are installed by npm install mjml (and re-doing this whenever new versions are available). While I like the idea behind mjml and all the knowledge about the quirks to get acceptable HTML rendering by various email clients we did not want to deploy a Node.js-based stack on our production servers. However even under the best circumstances this library will always lag a bit behind as each change must be translated to Python manually (a mostly mechanical process). This library should track the JS version of mjml so ideally you should get the same HTML. The upside is that there are lot of possibilities for you to make a real difference when you improve the code :-) Goals / Motivation Also the code likely contains many additional bugs. minification, beautification and validation). It lacks several features found in the JavaScript mjml implementation (e.g. This library only implements a subset of the original MJML project. mjml is a markup language created by Mailjet and designed to reduce the pain of coding a responsive email. It is implemented in pure Python and does not require JavaScript/NodeJS. This is an unofficial Python port of mjml v4. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |