Explanation¶
Background, design rationale, and the conceptual model behind tagz.
Read these when you want to understand why the library behaves the
way it does — not how to call it.
What’s here?¶
Why no templates? — the case for Python-as-template and where Jinja2 still wins.
Architecture — the class hierarchy:
Tag,TagInstance,Fragment,Raw,Page, and how they relate.The escaping model — exactly where
html.escape()is called, and why<script>and<style>are exceptions.Rendering and streaming — the three iter-methods, what
pretty=Truedoes and doesn’t promise.Callables and laziness — when callables run, how often, and what that means for side effects.
Async and
tagz— thetagz.aiomirror with async render and streaming viaiter_chunk/iter_lines.