Metadata-Version: 1.1
Name: jinja2schema
Version: 0.0.1
Summary: Type inference for Jinja2 templates.
Home-page: https://jinja2schema.readthedocs.org
Author: Anton Romanovich
Author-email: anthony.romanovich@gmail.com
License: Copyright (c) 2014 by Anton Romanovich.

Some rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
  copyright notice, this list of conditions and the following
  disclaimer in the documentation and/or other materials provided
  with the distribution.

* The names of the contributors may not be used to endorse or
  promote products derived from this software without specific
  prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Description: jinja2schema
        ============
        
        .. image:: https://travis-ci.org/aromanovich/jinja2schema.svg?branch=master
           :target: https://travis-ci.org/aromanovich/jinja2schema
        
        Documentation_ | GitHub_ |  PyPI_
        
        A library for inferring types from `Jinja2`_ templates.
        
        .. code-block:: python
        
            >>> from jinja2schema import infer
            >>> s = infer('{{ (x.a.b|first).name }}')
            >>> s
            {'x': {'a': {'b': [{'name': <scalar>}]}}
        
            >>> s = infer('''
            ... {% for x in xs %}
            ...   {{ x }}
            ... {% endfor %}
            ''')
            >>> s
            {'xs': [<scalar>]}
            >>> s.to_json_schema()
            {
                'type': 'object',
                'required': ['xs'],
                'properties': {
                    'xs': {
                        'type': 'array'
                        'title': 'xs',
                        'items': {
                            'title': 'x',
                            'anyOf': [
                                {'type': 'string'},
                                {'type': 'number'},
                                {'type': 'boolean'},
                                {'type': 'null'}
                            ],
                        },
                    }
                }
            }
        
        Installing
        ----------
        
        ::
        
            pip install jinja2schema
        
        License
        -------
        
        `BSD license`_
        
        .. _Jinja2: http://jinja.pocoo.org/docs/
        .. _Documentation: http://jinja2schema.rtfd.org/
        .. _GitHub: https://github.com/aromanovich/jinja2schema
        .. _PyPI: https://pypi.python.org/pypi/jinja2schema
        .. _BSD license: https://github.com/aromanovich/jinja2schema/blob/master/LICENSE
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Markup :: HTML
