Skip to main content

Filters from `os.path` for jinja2

Project description

jinja2-ext-path

$ pip install jinja2-ext-path

Usage

See Extensions - Adding Extensions.

Name of the extension is jinja2_ext_path.PathExtension.

You would be able to use it like this:

jinja_env = Environment(extensions=['jinja2_ext_path.PathExtension'])

Or:

jinja_env.add_extension('jinja2_ext_path.PathExtension')

Then you can render like this:

jinja2_env.from_string("{{ '/home/user/test.txt'| dirname }}")

For further reference:

Please note: all functions on os.path are included.

Installation

$ pip install jinja2-ext-path

Development

This project uses pre-commit.

License

Licensed under GNU General Public License (Version 3, 29 June 2007).

See LICENSE.md.

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_ext_path-0.1.1.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

jinja2_ext_path-0.1.1-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file jinja2_ext_path-0.1.1.tar.gz.

File metadata

  • Download URL: jinja2_ext_path-0.1.1.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.3.0

File hashes

Hashes for jinja2_ext_path-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fc92d6af0166302251751f51d64fdd7cd4339ee16c96f69b13ce589703b8ca2d
MD5 b337dcdc71ff6f8b1ad1d242f9afa177
BLAKE2b-256 48976342747f35930dd1619e921ad8e2d64174dd835f055af0e4c2d689303633

See more details on using hashes here.

Provenance

File details

Details for the file jinja2_ext_path-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: jinja2_ext_path-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.3.0

File hashes

Hashes for jinja2_ext_path-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6bb2c5b83d331bd6bc1e548e75bab37ee44842af9346839fd0e030fe0de0f75e
MD5 0d14db36269891aed5c05906059878d4
BLAKE2b-256 bf56e9eb49c0f7b3910277ca95894e1869488ecd9c2afaee306d555803196451

See more details on using hashes here.

Provenance

Supported by

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