a jinja2 extension to add a fnmatch filter
Project description
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_getenv_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"
# [...]
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jinja2_fnmatch_extension-0.0.2.tar.gz.
File metadata
- Download URL: jinja2_fnmatch_extension-0.0.2.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41808521ae4c2cc44758da29988bc5e2cb71e36f4f1549de3369b5ead55019cc
|
|
| MD5 |
888f974e63c35a09d55f67c3b21d9595
|
|
| BLAKE2b-256 |
39495abe7aeeebff20393fa0cb338cc5124631e1e88ca70f1fbb62fc00ea2135
|
File details
Details for the file jinja2_fnmatch_extension-0.0.2-py3-none-any.whl.
File metadata
- Download URL: jinja2_fnmatch_extension-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76df3323cb854a95d2fe0299afda5aa0bf116ab6ff9408714edf3b7e77961e39
|
|
| MD5 |
2b3cb9e49de265be27ada4efeef3bd57
|
|
| BLAKE2b-256 |
54163fd6ef5e9cccf3a8b71c299902362e01b8e0da200c3387cb1c3c9b627ed2
|