<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/chameleon-templates-modernized-chameleon-rs-mavwareqf" -->

---
title: Chameleon templates, modernized: chameleon-rs | daily.dev
description: chameleon-rs is a Rust reimplementation of the Chameleon templating language for Python web apps. It runs existing Chameleon templates unchanged with...
canonical: https://daily.dev/posts/chameleon-templates-modernized-chameleon-rs-mavwareqf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Chameleon templates, modernized: chameleon-rs | daily.dev
og:description: chameleon-rs is a Rust reimplementation of the Chameleon templating language for Python web apps. It runs existing Chameleon templates unchanged with...
og:url: https://daily.dev/posts/chameleon-templates-modernized-chameleon-rs-mavwareqf
og:image: https://api.daily.dev/og/posts/MAVwAReQf.png
og:image:alt: Chameleon templates, modernized: chameleon-rs
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Chameleon templates, modernized: chameleon-rs

**[Planet Python](https://daily.dev/sources/planetpython)** · 5 min read · 2 upvotes · 0 comments

## Summary

chameleon-rs is a Rust reimplementation of the Chameleon templating language for Python web apps. It runs existing Chameleon templates unchanged with byte-identical output, several times faster. In one web app, switching cut median response times by roughly 20% across the whole site, not just template rendering. It adds async rendering via render_async(), built-in partials, a Markdown expression (roughly 26x faster than mistune with the same extensions), and thread-safe free-threaded Python support. Migration takes one line with compat.install(), or you can switch imports directly. A shadow mode lets you run both engines side by side on real traffic before fully switching.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://mkennedy.codes/posts/chameleon-templates-modernized-chameleon-rs>

## Questions this post answers

### How do I switch my Flask or FastAPI app from Chameleon to chameleon-rs without rewriting templates?

Add 'import chameleon_rs.compat' and call 'chameleon_rs.compat.install()' at the very top of your app's entry point, before anything imports Chameleon. This installs a compatibility alias so existing Chameleon templates and code run unchanged with byte-identical output. Alternatively, switch imports directly from chameleon to chameleon_rs, and from chameleon_partials/chameleon_flask to chameleon_rs.partials/chameleon_rs.flask.

_Track emerging drop-in replacements like this on daily.dev before committing a production template stack._

### Does Chameleon templates support Python 3.14 free-threaded mode?

The original Chameleon package does not; its repository shows support only up to Python 3.13 and a failing build. chameleon-rs, a Rust reimplementation, was built specifically to add thread-safe rendering without the GIL, targeting free-threaded Python 3.14 and ongoing 3.15 development, after extensive profiling to minimize shared data and locking.

_Developers planning a free-threaded Python migration can follow templating compatibility updates on daily.dev._

### How much faster is Markdown rendering in chameleon-rs compared to mistune?

Markdown conversion inside chameleon-rs templates runs roughly 26 times faster than mistune with the same extensions. It uses the comrak Markdown converter built into chameleon-rs in Rust, so no separate Markdown package needs installing, and it's enabled via configure(markdown=True) with a markdown: expression in templates.

_Compare templating and Markdown rendering benchmarks on daily.dev before picking a stack for performance-sensitive apps._

## Similar posts on daily.dev

- [What I learned using Claude Sonnet to migrate Python to Rust](https://daily.dev/posts/what-i-learned-using-claude-sonnet-to-migrate-python-to-rust-wtchq1s8n) · InfoWorld · 10 upvotes · 1 comments
- [As If](https://daily.dev/posts/as-if-v1hq1kbgo) · RUBYLAND · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#rust](https://daily.dev/tags/rust)

[View this post on daily.dev](https://daily.dev/posts/chameleon-templates-modernized-chameleon-rs-mavwareqf)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Chameleon templates, modernized: chameleon-rs","url":"https://daily.dev/posts/chameleon-templates-modernized-chameleon-rs-mavwareqf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/chameleon-templates-modernized-chameleon-rs-mavwareqf"},"datePublished":"2026-10-28T04:53:58.690Z","dateModified":"2026-10-28T05:44:54.445Z","description":"chameleon-rs is a Rust reimplementation of the Chameleon templating language for Python web apps. It runs existing Chameleon templates unchanged with...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4cb90d86c8c56369cd777e4b75706e3e?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4cb90d86c8c56369cd777e4b75706e3e?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Planet Python","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet Python","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/eac3cc584cb043b5a242d13752bd3d0c","url":"https://daily.dev/sources/planetpython"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/chameleon-templates-modernized-chameleon-rs-mavwareqf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,rust","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet Python","item":"https://daily.dev/sources/planetpython"},{"@type":"ListItem","position":3,"name":"Chameleon templates, modernized: chameleon-rs"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/chameleon-templates-modernized-chameleon-rs-mavwareqf#faq","mainEntity":[{"@type":"Question","name":"How do I switch my Flask or FastAPI app from Chameleon to chameleon-rs without rewriting templates?","acceptedAnswer":{"@type":"Answer","text":"Add 'import chameleon_rs.compat' and call 'chameleon_rs.compat.install()' at the very top of your app's entry point, before anything imports Chameleon. This installs a compatibility alias so existing Chameleon templates and code run unchanged with byte-identical output. Alternatively, switch imports directly from chameleon to chameleon_rs, and from chameleon_partials/chameleon_flask to chameleon_rs.partials/chameleon_rs.flask. Track emerging drop-in replacements like this on daily.dev before committing a production template stack."}},{"@type":"Question","name":"Does Chameleon templates support Python 3.14 free-threaded mode?","acceptedAnswer":{"@type":"Answer","text":"The original Chameleon package does not; its repository shows support only up to Python 3.13 and a failing build. chameleon-rs, a Rust reimplementation, was built specifically to add thread-safe rendering without the GIL, targeting free-threaded Python 3.14 and ongoing 3.15 development, after extensive profiling to minimize shared data and locking. Developers planning a free-threaded Python migration can follow templating compatibility updates on daily.dev."}},{"@type":"Question","name":"How much faster is Markdown rendering in chameleon-rs compared to mistune?","acceptedAnswer":{"@type":"Answer","text":"Markdown conversion inside chameleon-rs templates runs roughly 26 times faster than mistune with the same extensions. It uses the comrak Markdown converter built into chameleon-rs in Rust, so no separate Markdown package needs installing, and it's enabled via configure(markdown=True) with a markdown: expression in templates. Compare templating and Markdown rendering benchmarks on daily.dev before picking a stack for performance-sensitive apps."}}]}
```

