jinja2-indent
This Jinja2 extension adjusts the indentation of block content to a specified width.
Compatibility
python>= 3.9
Installation
Install the latest release with pip:
pip install jinja2-indent
Usage
The {% indent %} tag provided by this extension allows you to adjust the indentation level of the content inside the tag block. You can specify the desired width (in spaces), and the extension will reformat the content accordingly. This is particularly useful for aligning nested or indented structures in templates.
Example
The following example demonstrates how to increase the indentation of a block of text:
root:
{% indent 2 %}
- name: a
value: 1
- name: b
value: 2
- name: c
value: 3
{% endindent %}
root:
- name: a
value: 1
- name: b
value: 2
- name: c
value: 3
The following example demonstrates how to remove unnecessary indentation from a block of text:
- name: a
value: 1
{% indent 0 %}
- name: b
value: 2
{% endindent %}
- name: c
value: 3
- name: a
value: 1
- name: b
value: 2
- name: c
value: 3
Metadata
Release files for jinja2-indent 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jinja2_indent-0.3.0.tar.gz | 4.1 kB | Without provenance | Details for jinja2_indent-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jinja2_indent-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for jinja2_indent-0.3.0-py3-none-any.whl |
Total release size: 8.5 kB
Release files / jinja2_indent-0.3.0.tar.gz
| Download URL | jinja2_indent-0.3.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b803171d17f26fbb6a541749d15d2946c049ee5489ac771af7659953c45c69a3
|
|
BLAKE2b-256 checksum How to use checksums |
86c23dc5ff71d68f5456ee63be2daa90642fc25450b4b88aabf673b83bd69013
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.12.8 Linux/6.5.0-1025-azure
|
Release files / jinja2_indent-0.3.0-py3-none-any.whl
| Download URL | jinja2_indent-0.3.0-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbc140b02a8d019ccab44a25f2062352ef369685e89a5a0d1ca3c14b95474f69
|
|
BLAKE2b-256 checksum How to use checksums |
49223624a10c64a5ba59b5d882e7f08819e02b2f3f2953ffa6de7030978be760
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.12.8 Linux/6.5.0-1025-azure
|
Security for jinja2-indent 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.