Metadata-Version: 2.4
Name: litestar_chameleon
Version: 0.2
Summary: Support for Chameleon templates in Litestar.
Keywords: template
Author: H. Turgut Uyar
Author-email: H. Turgut Uyar <uyar@tekir.org>
License-Expression: BSD-3-Clause
License-File: LICENSE.txt
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Litestar
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Text Processing :: Markup :: HTML
Requires-Dist: chameleon>=4.6.0,<5
Requires-Dist: litestar>=2.23.0,<3
Requires-Python: >=3.12
Project-URL: homepage, https://pypi.org/project/litestar_chameleon/
Project-URL: repository, https://github.com/uyar/litestar_chameleon
Description-Content-Type: text/markdown

# litestar_chameleon

litestar_chameleon lets developers use
[Chameleon](https://chameleon.readthedocs.io/) templates
in [Litestar](https://litestar.dev/) applications.

## Usage

When creating the application:

```python
from litestar.template import TemplateConfig
from litestar_chameleon import ChameleonTemplateEngine

template_config = TemplateConfig(
    engine=ChameleonTemplateEngine,
    directory=templates_dir,
)

app = Litestar(..., template_config=template_config, ...)
```

When using it in a route:

```python
from litestar.response import Template

@get("/")
async def demo() -> Template:
    return Template(
        "demo.pt",
        context={"title": "...", "body": "..."},
    )
```
