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.mddocs/quickstart.mddocs/api.md
Changelog
See CHANGELOG.md.
Project details
Release history Release notifications | RSS feed
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.12.tar.gz
(10.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jinja2_async-2026.1.12.tar.gz.
File metadata
- Download URL: jinja2_async-2026.1.12.tar.gz
- Upload date:
- Size: 10.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4685b48266c53b7601af5efbd2577ae190f43ff115b9758fffd0e8eada2074a
|
|
| MD5 |
e218ac178f08f6569457b75b40acec55
|
|
| BLAKE2b-256 |
61ac5312ad94e65e99dcb56235aa6c700deed4f493913352ba914435622ae67b
|
File details
Details for the file jinja2_async-2026.1.12-py3-none-any.whl.
File metadata
- Download URL: jinja2_async-2026.1.12-py3-none-any.whl
- Upload date:
- Size: 10.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1695a57f4edeeab49fdb2d72c32b31fe4cf5bbccccb683032d25567ba2f5f163
|
|
| MD5 |
21b21023ea8321bedd615f52f2ccfad1
|
|
| BLAKE2b-256 |
8e5731e6320bf4014495e38782554da15a296254031c31f979f401ce14c79bc4
|