jinja2-mjml


Namejinja2-mjml JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/hyzyla/jinja2_mjml
SummaryJinja2 integration with MJML
upload_time2023-01-31 18:51:06
maintainer
docs_urlNone
authorYevhenii Hyzyla
requires_python>=3.7,<4.0
licenseMIT
keywords jinja2 mjml email
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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('''
    <mjml>
      <mj-body>
        <mj-section>
          <mj-column>
            <mj-text>Hello {{ name }}!</mj-text>
          </mj-column>
        </mj-section>
      </mj-body>
    </mjml>
''')

# Render MJML template to HTML
print(template.render(name='MJML'))
```
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hyzyla/jinja2_mjml",
    "name": "jinja2-mjml",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "jinja2,mjml,email",
    "author": "Yevhenii Hyzyla",
    "author_email": "hyzyla@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/02/25/816e3caa703a63cd71e30b1cc0e89d1e7a6d74f86450fd31064eec20d9f1/jinja2_mjml-0.1.0.tar.gz",
    "platform": null,
    "description": "# Jinja2 MJML\n\nMicro-package that integrates [MJML](https://mjml.io/) \nwith [Jinja2](https://jinja.palletsprojects.com/en/2.11.x/).\n\nUnder the hood it uses [mjml_python](https://pypi.org/project/mjml-python/) \npackage, that is a wrapper around [rust port](https://github.com/jolimail/mrml-core)\nof MJML.\n\n## Example\n\n```python\nfrom jinja2_mjml import Environment\n\n# MJMLEnvironment it's thin wrapper around jinja2.Environment,\n# so you can use all the features of Jinja2 package.\nenvironment = Environment()\ntemplate = environment.from_string('''\n    <mjml>\n      <mj-body>\n        <mj-section>\n          <mj-column>\n            <mj-text>Hello {{ name }}!</mj-text>\n          </mj-column>\n        </mj-section>\n      </mj-body>\n    </mjml>\n''')\n\n# Render MJML template to HTML\nprint(template.render(name='MJML'))\n```",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Jinja2 integration with MJML",
    "version": "0.1.0",
    "split_keywords": [
        "jinja2",
        "mjml",
        "email"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8f2b057fcf32a65a456a06e7f24addffd5a02f007092da9436eac8348ecca2ec",
                "md5": "549088798476ca3445238af2c2ce4d1a",
                "sha256": "fdd8f40343e3c0856377f8fda058438b45065401f9ad99cc52387b2fda23ff3f"
            },
            "downloads": -1,
            "filename": "jinja2_mjml-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "549088798476ca3445238af2c2ce4d1a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 3044,
            "upload_time": "2023-01-31T18:51:03",
            "upload_time_iso_8601": "2023-01-31T18:51:03.961776Z",
            "url": "https://files.pythonhosted.org/packages/8f/2b/057fcf32a65a456a06e7f24addffd5a02f007092da9436eac8348ecca2ec/jinja2_mjml-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0225816e3caa703a63cd71e30b1cc0e89d1e7a6d74f86450fd31064eec20d9f1",
                "md5": "a567236e31971434e8d5eda22ef8e26c",
                "sha256": "400535fd22efc593c211b6d0ffbab6463eb70b0d6a03bbc1fabdb33a10db1c61"
            },
            "downloads": -1,
            "filename": "jinja2_mjml-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a567236e31971434e8d5eda22ef8e26c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 2711,
            "upload_time": "2023-01-31T18:51:06",
            "upload_time_iso_8601": "2023-01-31T18:51:06.687524Z",
            "url": "https://files.pythonhosted.org/packages/02/25/816e3caa703a63cd71e30b1cc0e89d1e7a6d74f86450fd31064eec20d9f1/jinja2_mjml-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-31 18:51:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "hyzyla",
    "github_project": "jinja2_mjml",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "jinja2-mjml"
}
        
Elapsed time: 0.03793s