Skip to main content

Support for Chameleon templates in Litestar.

Project description

litestar_chameleon

litestar_chameleon lets developers use Chameleon templates in Litestar applications.

Usage

When creating the application:

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:

from litestar.response import Template

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

litestar_chameleon-0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

litestar_chameleon-0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file litestar_chameleon-0.1.tar.gz.

File metadata

  • Download URL: litestar_chameleon-0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for litestar_chameleon-0.1.tar.gz
Algorithm Hash digest
SHA256 c3b4b63287f2c8fc6d100eee93c7b95ec90fd028e4d80c8c56ec0a3984f1af07
MD5 902e82bc15f5dbe5a98a2fb3c60a7f5e
BLAKE2b-256 38a6dd7f39a38acd68f45bd037f2d460c41c710802dd16103cd83027813104b2

See more details on using hashes here.

File details

Details for the file litestar_chameleon-0.1-py3-none-any.whl.

File metadata

  • Download URL: litestar_chameleon-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for litestar_chameleon-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d9beae50cb66f6f4adb186a63722075a61a31c152c86ac228d0397496524f18
MD5 a9506aa3b98ab5b8ad9c6cceb7eea6b7
BLAKE2b-256 04b6cdd7a7c8f809421e8e839302c08bdd804963b9de2c3431539b2d15c77991

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page