pgjinja
pgjinja · MiniJinja template rendering with JSONB contexts and stored templates.
Overview
PostgreSQL · 14, 15, 16, 17, 18
Usage
Sources:
pgjinja 0.1.0 renders MiniJinja templates directly from JSONB data in PostgreSQL.
Core Workflow
jinja_render renders inline templates. jinja_render_named reads jinja_templates, including inheritance and includes; jinja_syntax_error returns parse diagnostics. Stored-template changes invalidate session caches through PostgreSQL’s transactional invalidation mechanism.
Operational Boundaries
The README supports PostgreSQL 14–18 on Linux/macOS; installation is superuser-only. Inline escaping defaults to off, so enable autoescaping for untrusted HTML. Keep pgjinja.fuel bounded: statement timeouts cannot interrupt rendering until control returns. JSON numbers become 64-bit integers/floats; pass exact large numbers as text. Templates do not receive filesystem or network access.