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.30.tar.gz (9.0 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.30-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jinja2_async-2026.1.30.tar.gz
  • Upload date:
  • Size: 9.0 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.30.tar.gz
Algorithm Hash digest
SHA256 e02bb5fbf2053f485d05f6ab80d58350ee998c754ded29a331f59c9b40187771
MD5 c07fe715601c80eb088d30cbe00bed43
BLAKE2b-256 6114765aa93dcd62c4815807a2a75a9558221d6d7eaa6c1d646042aa1f5dbe9d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jinja2_async-2026.1.30-py3-none-any.whl
  • Upload date:
  • Size: 11.2 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.30-py3-none-any.whl
Algorithm Hash digest
SHA256 69debf674c9f01bb33324a2615052236530405fbc1d017f1f8f32decf1949b84
MD5 839670ee0ef8894b5ef06d2fc185dc34
BLAKE2b-256 287aa02414063c87a21e6918740a78ae0dc67fb337926bd4257503103ab60489

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