Metadata-Version: 1.1
Name: chevron
Version: 0.12.2
Summary: Mustache templating language renderer
Home-page: https://github.com/noahmorrison/chevron
Author: noah morrison
Author-email: noah@morrison.ph
License: MIT
Description: |PyPI version| |Build Status| |Coverage Status|
        
        A python implementation of the `mustache templating
        language <http://mustache.github.io>`__.
        
        Why chevron?
        ------------
        
        I’m glad you asked!
        
        chevron is fast
        ~~~~~~~~~~~~~~~
        
        Chevron runs in less than half the time of
        `pystache <http://github.com/defunkt/pystache>`__ (Which is not even up
        to date on the spec). And in about 70% the time of
        `Stache <https://github.com/hyperturtle/Stache>`__ (A ‘trimmed’ version
        of mustache, also not spec compliant).
        
        chevron is pep8
        ~~~~~~~~~~~~~~~
        
        The flake8 command is run by
        `travis <https://travis-ci.org/noahmorrison/chevron>`__ to ensure
        consistency.
        
        chevron is spec compliant
        ~~~~~~~~~~~~~~~~~~~~~~~~~
        
        Chevron passes all the unittests provided by the
        `spec <https://github.com/mustache/spec>`__ (in every version listed
        below).
        
        If you find a test that chevron does not pass, please `report
        it. <https://github.com/noahmorrison/chevron/issues/new>`__
        
        chevron is Python 2 and 3 compatible
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
        Python 2.6, 2.7, 3.2, 3.3, 3.4, 3.5, and 3.6 are all tested by travis.
        
        USAGE
        -----
        
        Commandline usage: (if installed via pypi)
        
        ::
        
            usage: chevron [-h] [-v] [-d DATA] [-p PARTIALS_PATH] [-e PARTIALS_EXT]
                           [-l DEF_LDEL] [-r DEF_RDEL]
                           template
        
            positional arguments:
              template              The mustache file
        
            optional arguments:
              -h, --help            show this help message and exit
              -v, --version         show program's version number and exit
              -d DATA, --data DATA  The json data file
              -p PARTIALS_PATH, --path PARTIALS_PATH
                                    The directory where your partials reside
              -e PARTIALS_EXT, --ext PARTIALS_EXT
                                    The extension for your mustache partials, 'mustache'
                                    by default
              -l DEF_LDEL, --left-delimiter DEF_LDEL
                                    The default left delimiter, "{{" by default.
              -r DEF_RDEL, --right-delimiter DEF_RDEL
                                    The default right delimiter, "}}" by default.
        
        Python usage with strings
        
        .. code:: python
        
            import chevron
        
            chevron.render('Hello, {{ mustache }}!', {'mustache': 'World'})
        
        Python usage with file
        
        .. code:: python
        
            import chevron
        
            with open('file.mustache', 'r') as f:
                chevron.render(f, {'mustache': 'World'})
        
        Python usage with unpacking
        
        .. code:: python
        
            import chevron
        
            args = {
              template: 'Hello, {{ mustache }}!',
        
              data: {
                'mustache': 'World'
              }
            }
        
            chevron.render(**args)
        
        chevron supports partials (via dictionaries)
        
        .. code:: python
        
            import chevron
        
            args = {
                template: 'Hello, {{> thing }}!',
        
                partials_dict: {
                    'thing': 'World'
                }
            }
        
            chevron.render(**args)
        
        chevron supports partials (via the filesystem)
        
        .. code:: python
        
            import chevron
        
            args = {
                template: 'Hello, {{> thing }}!',
        
                # defaults to .
                partials_path: 'partials/',
        
                # defaults to mustache
                partials_ext: 'ms',
            }
        
            # ./partials/thing.ms will be read and rendered
            chevron.render(**args)
        
        INSTALL
        -------
        
        -  with git
        
        ::
        
            $ git clone https://github.com/noahmorrison/chevron.git
        
        or using submodules
        
        ::
        
            $ git submodules add https://github.com/noahmorrison/chevron.git
        
        Also available on pypi!
        
        -  with pip
        
        ::
        
            $ pip install chevron
        
        TODO
        ----
        
        -  get popular
        -  have people complain
        -  fix those complaints
        
        .. |PyPI version| image:: https://badge.fury.io/py/chevron.svg
           :target: https://badge.fury.io/py/chevron
        .. |Build Status| image:: https://travis-ci.org/noahmorrison/chevron.svg?branch=master
           :target: https://travis-ci.org/noahmorrison/chevron
        .. |Coverage Status| image:: https://img.shields.io/coveralls/noahmorrison/chevron.svg
           :target: https://coveralls.io/r/noahmorrison/chevron?branch=master
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Text Processing :: Markup
