API Reference
Everything chameleon-robyn exports: setup, the @template decorator, lower-level rendering, and the Robyn TemplateInterface implementation.
Setup & configuration
Initialize the template engine once at app startup.
- global_init()
-
Initialize the Chameleon template engine.
- clear()
-
Reset the template engine to its uninitialized state.
Rendering views
The @template decorator and friendly 404s for Robyn route handlers.
- template()
-
Decorate a Robyn view method to render an HTML response.
- not_found()
-
Render a friendly 404 page from within a @template-decorated handler.
Lower-level rendering
Render templates outside the decorator (middleware, error handlers, emails).
- render()
-
Render a Chameleon template to a string (no Response wrapping).
- response()
-
Render a Chameleon template and wrap it in a fully-formed Robyn Response.
Robyn TemplateInterface
Standalone template engine class matching Robyn’s built-in template pattern.
- ChameleonTemplate
-
Chameleon template engine implementing Robyn’s TemplateInterface.
Exceptions
Exception types raised by the library.
- ChameleonRobynException
-
Base exception for all chameleon-robyn errors (bad configuration, invalid return types, etc.).
- ChameleonRobynNotFoundException
-
Raised by not_found() to signal a 404 from within a @template-decorated handler.