Metadata-Version: 2.4
Name: litestar_chameleon
Version: 0.1
Summary: Support for Chameleon templates in Litestar.
Author-email: "H. Turgut Uyar" <uyar@tekir.org>
License-Expression: BSD-3-Clause
Project-URL: homepage, https://pypi.org/project/litestar_chameleon/
Project-URL: repository, https://code.tekir.org/uyar/litestar_chameleon
Keywords: template
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-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: chameleon<5,>=4.6.0
Requires-Dist: litestar<3,>=2.23.0
Dynamic: license-file

# 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": "..."},
    )
```
