Registry / devops / j2lint

j2lint

JSON →
library1.2.0pypypi✓ verified 80d ago

j2lint is a command-line utility that validates Jinja2 syntax according to Arista's AVD style guide. It checks for formatting, spelling, and structural issues in Jinja2 templates. Current version: 1.2.0. Release cadence: occasional, maintenance mode.

pip install j2lint
INSTALL
IMPORT
SIG · J2LINT
J
j2lint
devopspythonv1.2.0
Install
2.8s avg
Import
Disk
30MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 31.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.8s · import 0.000s · 32MB
30MB installed
● package 30MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Console
from j2lint import Console
from j2lint import J2LintRunner
CONSOLE
from j2lint import CONSOLE
VERSION
from j2lint import VERSION

Run j2lint programmatically on a Jinja2 template file.

from j2lint import J2LintRunner runner = J2LintRunner() runner.run(['template.j2'])
j2lint --version
Debug
Known issues
breakingVersion 1.0.0 changed the CLI output format from plain text to structured JSON. Scripts parsing stdout will break.
fix
Update parsing logic to expect JSON output, or use the --format plain flag (if available) to revert to old style.
affects: >=1.0.0
gotchaBy default, j2lint only checks files with .j2 extension. Other extensions are ignored unless explicitly passed.
fix
Pass files with .j2 extension or use --ext .<ext> to add custom extensions.
affects: all
gotchaj2lint's built-in rules are opinionated towards Arista's AVD style guide. Running on non-AVD templates may produce many false positives.
fix
Disable specific rules via --ignore RULE or create a custom config file.
affects: all
Upgrade
Version history
1.2.0latest on PyPI · released Apr 4, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
j2lint — pip install j2lint · libregistry