a jinja2 extension to add a fnmatch filter
Project description
jinja2_fnmatch_extension
Status (master branch)
What is it ?
This is a jinja2 extension to expose fnmatch function.
Syntax
The syntax is |fnmatch(pattern)
.
Example
from jinja2 import Template, Environment
# We load the extension in a jinja2 Environment
env = Environment(extensions=["jinja2_fnmatch_extension.FnMatchExtension"])
# For the example, we use a template from a simple string
template = env.from_string("{{ 'foo-bar'|fnmatch('foo-*') }}")
result = template.render()
assert result == "True"
# [...]
Contributing guide
See CONTRIBUTING.md file.
Code of Conduct
See CODE_OF_CONDUCT.md file.
Sponsors
(If you are officially paid to work on MetWork Framework, please contact us to add your company logo here!)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for jinja2_fnmatch_extension-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b636b2f2993564c8bbec1c1dd3149d27218158192cd05e2e842a9382bc874af |
|
MD5 | 697a241040faa07b4736311ae22739d5 |
|
BLAKE2b-256 | ca5cbc4291fec689c11eb03f3e9ae1366b80cf4a8e63c345bafd170f3ea60330 |
Close
Hashes for jinja2_fnmatch_extension-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7d191339cf46e864b77ce37ffc69098b2f3fe6bf935cc2381902db1413bd512 |
|
MD5 | 8738e262550e135bef9b6ec99534d6ce |
|
BLAKE2b-256 | 6a54326d72c8a7ac05e8a8ae65a925c74ac84dd32c3737776e2c76c65b7f80e8 |