Metadata-Version: 2.1
Name: jinja2-fnmatch-extension
Version: 0.0.2
Summary: a jinja2 extension to add a fnmatch filter
Home-page: https://github.com/metwork-framework/jinja2_fnmatch_extension
Author: Fabien MARTY
Author-email: fabien.marty@gmail.com
License: BSD
Keywords: jinja2 extension
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.0
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jinja2

## What is it ?

This is a [jinja2](http://jinja.pocoo.org/) extension to expose [fnmatch](https://docs.python.org/3/library/fnmatch.html#fnmatch.fnmatch) function.

## Syntax

The syntax is `|fnmatch(pattern)`.

## Example

```python

from jinja2 import Template, Environment

# We load the extension in a jinja2 Environment
env = Environment(extensions=["jinja2_getenv_extension.FnMatchExtension"])

# For the example, we use a template from a simple string
template = env.from_string("{% raw %}{{ 'foo-bar'|fnmatch('foo-*') }}{% endraw %}")
result = template.render()

assert result == "True"
# [...]

```


