Skip to main content

a jinja2 extension to add a fnmatch filter

Project description

jinja2_fnmatch_extension

Status (master branch)

GitHub CI Maintenance

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!)

logo

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

jinja2_fnmatch_extension-1.0.3.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jinja2_fnmatch_extension-1.0.3-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file jinja2_fnmatch_extension-1.0.3.tar.gz.

File metadata

File hashes

Hashes for jinja2_fnmatch_extension-1.0.3.tar.gz
Algorithm Hash digest
SHA256 95943afb38afd7d948ce636f9776fa975d6e6f2e4e010158f95103c7aea1df20
MD5 4423b9eb82a1376b345b08770926d8ae
BLAKE2b-256 a80517d6f4c2a5ae1e2e33ccf6393bc72ab3d5e8665c1c3e4574cceca98a9da1

See more details on using hashes here.

File details

Details for the file jinja2_fnmatch_extension-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for jinja2_fnmatch_extension-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0993e5115482c80163670c1c37dde4b5797a51d18532be32c4cfcdb8d4c0ebf5
MD5 ff36310749aeacbb85e7d23a890f0b2a
BLAKE2b-256 ff12febe05c4f436a36ac6b16ba6a36517397c4cfd6fb9d27d6ab7c9ff031566

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page