Metadata-Version: 2.1
Name: jonja
Version: 0.1.0
Summary: Simple jinja-based texts and objects render
License: MIT
Keywords: jinja,template,text
Author: lightmanLP
Author-email: liteman1000@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: aiofile (>=3.8.8,<4.0.0)
Requires-Dist: async-cache (>=1.1.1,<2.0.0)
Requires-Dist: jinja2 (>=3.1.3,<4.0.0)
Requires-Dist: oyaml (>=1.0,<2.0)
Requires-Dist: yamt (>=0.1.3.1,<0.2.0.0)
Project-URL: Github, https://github.com/UT1C/jonja
Description-Content-Type: text/markdown

# jonja
[![PyPI version](https://badge.fury.io/py/jonja.svg)](https://badge.fury.io/py/jonja)
![PyPI downloads per mounth](https://img.shields.io/pypi/dm/jonja)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/UT1C/jonja)

Jinja-based texts and objects render.

## Installation
```
pip install jonja
```

## Usage
1. Make template
`hello.j2`
```j2
Hello, {{ username }}!
*#!#*
world:
  $cls: "types:SimpleNamespace"
  $kwargs: {name: earth, size: {{ world_size }} }
```
2. Make env
```py
from pathlib import Path
from jonja import JonjaEnv
env = JonjaEnv(Path.cwd() / "static" / "templates")
```
3. Render
```py
text, objs = await env.render("hello", username="mikk", world_size=10_000)
```

