Skip to main content

Jinja2, but with async template loaders

Project description

jinja2-async

jinja2-async is a small wrapper around Jinja2 that provides async-aware loaders and an async-first environment API.

Install

python -m pip install jinja2-async

Basic usage

import asyncio

from jinja2_async import AsyncEnvironment, FileSystemLoader


async def main() -> None:
    env = AsyncEnvironment(loader=FileSystemLoader("templates"))

    # AsyncEnvironment intentionally aliases `get_template` to an async method,
    # so it returns an awaitable.
    tmpl = await env.get_template("hello.html")
    rendered = await tmpl.render_async(name="World")
    print(rendered)


asyncio.run(main())

Documentation

The docs are plain Markdown under docs/:

  • docs/index.md
  • docs/quickstart.md
  • docs/api.md

Changelog

See CHANGELOG.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_async-2026.1.11.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

jinja2_async-2026.1.11-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file jinja2_async-2026.1.11.tar.gz.

File metadata

  • Download URL: jinja2_async-2026.1.11.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jinja2_async-2026.1.11.tar.gz
Algorithm Hash digest
SHA256 adacdf15d402ce5ffdc3f743afcec9b503fc91668be7422441427e7caf605251
MD5 0fc37767703c4300fe18d5c7288392cd
BLAKE2b-256 246654d523c9e7b6ca5bebb57dd347c50c4dbc5f69ca0667b8aefeaff610f284

See more details on using hashes here.

File details

Details for the file jinja2_async-2026.1.11-py3-none-any.whl.

File metadata

  • Download URL: jinja2_async-2026.1.11-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jinja2_async-2026.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 8dee6579f892ed1f3e4be0f65cfb6023a86f8fc88c5acdb55b566dd5089e0ff0
MD5 28dd9824b87ff240f6e4bf8c0e7687c5
BLAKE2b-256 04086db8fdcfbf22c67f8e327a94699d56d310a5930205aa70ae50a3c202c629

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