aioja
Async version of Jinja2.
This library contains a modification of the Jinja2 library.
In addition to Jinja's built-in render_async, i've added:
- async
FileSystemLoader(via aiofiles) - async bytecode cache (aioredis and aiocache supported)
- async version of the
Environment.compile_templatesmethod
Install
pip install aioja
Quick Start
from aioja.environment import Environment
from aioja.loaders import FileSystemLoader
from aioja.bccache.aiocache import AioCacheBytecodeCache
env = Environment(
loader=FileSystemLoader('templates'),
# ...
# bytecode_cache=AioCacheBytecodeCache()
# ...
)
template = await env.get_template('index.html')
content = await template.render_async({
'page_id': 123
})
Metadata
Release files for aioja 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aioja-0.0.4.tar.gz | 11.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aioja-0.0.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 28.5 kB
Release files / aioja-0.0.4.tar.gz
| Download URL | aioja-0.0.4.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7e4256d53d9fbbcefe02258bebc3429f9f103e1067ee2a942bef2640285c62b
|
|
BLAKE2b-256 checksum How to use checksums |
4280e9f30ba86a34455a75f83a8943ce65aafd6c23b66c6fe7909811a17e37c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.0
|
Release files / aioja-0.0.4-py2.py3-none-any.whl
| Download URL | aioja-0.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e6e1625ff99197a70bdb3ae6cbea628af8eb814d9e5a4f9e66ba2c781737f071
|
|
BLAKE2b-256 checksum How to use checksums |
f1ab429c917aa87314665b4f9a5227b73f85cf23b0574d1c6895c82bdc18f974
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.0
|