Jinja2-Haml


NameJinja2-Haml JSON
Version 0.3.5 PyPI version JSON
download
home_pageNone
SummaryHaml-ish syntax for jinja2 templates
upload_time2024-04-01 16:54:22
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords jinja2 templates haml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ========================
Hamlish-Jinja
========================

Overview
========

This extension to jinja makes it possible to use a haml-ish syntax for your jinja templates. It is
implemented as a preprocessor and so it runs only the first time your template is parsed. So it will
not affect the performance of your templates except for the first run.

Forked from `Pitmairen/hamlish-jinja <https://github.com/Pitmairen/hamlish-jinja>`_

Usage
=====

Install
--------

You can install the latest version with pip

::

    pip install git+https://git.barkshark.xyz/barkshark/hamlish-jinja

or

::

    pip install jinja2-haml

Basic Usage
-----------

To use this extension you just need to add it to you jinja environment and use ".haml", ".jhaml", or
".jaml" as an extension for your templates.

.. code-block:: python

    from jinja2 import Environment
    from hamlish_jinja import HamlishExtension

    env = Environment(extensions = [HamlishExtension])


Environment
-----------

*Added in version 0.2.0*

The environment gets extended with a new method ``hamlish_from_string``
which works the same as the standard ``env.from_string`` method, but renders
the template with the hamlish preprocessor.

.. code-block:: haml

    tpl = '''
    %div
        %p
            test
    '''

    env.hamlish_from_string(tpl).render()

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "Jinja2-Haml",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "jinja2, templates, haml",
    "author": null,
    "author_email": "zoey Mae <admin@barkshark.xyz>",
    "download_url": "https://files.pythonhosted.org/packages/fb/92/e86160db90a7bd085ec80057733f4c5f68899c273ffb40176fd6d6709cfe/Jinja2-Haml-0.3.5.tar.gz",
    "platform": "any",
    "description": "========================\nHamlish-Jinja\n========================\n\nOverview\n========\n\nThis extension to jinja makes it possible to use a haml-ish syntax for your jinja templates. It is\nimplemented as a preprocessor and so it runs only the first time your template is parsed. So it will\nnot affect the performance of your templates except for the first run.\n\nForked from `Pitmairen/hamlish-jinja <https://github.com/Pitmairen/hamlish-jinja>`_\n\nUsage\n=====\n\nInstall\n--------\n\nYou can install the latest version with pip\n\n::\n\n    pip install git+https://git.barkshark.xyz/barkshark/hamlish-jinja\n\nor\n\n::\n\n    pip install jinja2-haml\n\nBasic Usage\n-----------\n\nTo use this extension you just need to add it to you jinja environment and use \".haml\", \".jhaml\", or\n\".jaml\" as an extension for your templates.\n\n.. code-block:: python\n\n    from jinja2 import Environment\n    from hamlish_jinja import HamlishExtension\n\n    env = Environment(extensions = [HamlishExtension])\n\n\nEnvironment\n-----------\n\n*Added in version 0.2.0*\n\nThe environment gets extended with a new method ``hamlish_from_string``\nwhich works the same as the standard ``env.from_string`` method, but renders\nthe template with the hamlish preprocessor.\n\n.. code-block:: haml\n\n    tpl = '''\n    %div\n        %p\n            test\n    '''\n\n    env.hamlish_from_string(tpl).render()\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Haml-ish syntax for jinja2 templates",
    "version": "0.3.5",
    "project_urls": {
        "Homepage": "https://git.barkshark.xyz/barkshark/hamlish-jinja"
    },
    "split_keywords": [
        "jinja2",
        " templates",
        " haml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "adda999785dc51cdf13f2c22e224a0958c2adc4d1bcbbb3f03898e0f008316cb",
                "md5": "10a7400db30184b62e51335b3b7bef37",
                "sha256": "81bba88d1aeb63f0016b972a6b031b97b501e09594c5585ad71cb834c1f70552"
            },
            "downloads": -1,
            "filename": "Jinja2_Haml-0.3.5-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "10a7400db30184b62e51335b3b7bef37",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 16499,
            "upload_time": "2024-04-01T16:54:20",
            "upload_time_iso_8601": "2024-04-01T16:54:20.381821Z",
            "url": "https://files.pythonhosted.org/packages/ad/da/999785dc51cdf13f2c22e224a0958c2adc4d1bcbbb3f03898e0f008316cb/Jinja2_Haml-0.3.5-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fb92e86160db90a7bd085ec80057733f4c5f68899c273ffb40176fd6d6709cfe",
                "md5": "2adac7bb85d70b83bb9021536f4f25a0",
                "sha256": "c4aa29cef0d67146fedb3be145aad79746ef8957363d434efe4cebfca78d373e"
            },
            "downloads": -1,
            "filename": "Jinja2-Haml-0.3.5.tar.gz",
            "has_sig": false,
            "md5_digest": "2adac7bb85d70b83bb9021536f4f25a0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 20648,
            "upload_time": "2024-04-01T16:54:22",
            "upload_time_iso_8601": "2024-04-01T16:54:22.634861Z",
            "url": "https://files.pythonhosted.org/packages/fb/92/e86160db90a7bd085ec80057733f4c5f68899c273ffb40176fd6d6709cfe/Jinja2-Haml-0.3.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-01 16:54:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "jinja2-haml"
}
        
Elapsed time: 1.16028s