V2.1.0-alpha
Release: ScribeFramework v2.1.0-alpha
We are excited to announce the alpha release of ScribeFramework v2.1.0, focusing on a more interactive and dynamic developer
experience. This version introduces native support for HTMX and SSE (Server-Sent Events), allowing you to build real-time,
responsive web applications directly within the Scribe ecosystem.
Key Features & Improvements
Native SSE Data Streams
You can now easily create real-time data streams using the new @sse decorator. Whether you're building a live counter, a
dashboard, or a progress bar, Scribe now handles all the SSE formatting for you.
- @sse Decorator: Automatically sets the correct text/event-stream headers and handles streaming responses.
- Generator Support: Use standard Python yield to push updates to the client incrementally.
frame()Helper: A new built-in helper to render template snippets for SSE events with automatic multiline data formatting.
HTMX Fragment Routes
Scribe is now even more compatible with HTMX through the @no_layout decorator, which simplifies building SPA-like
experiences.
@no_layoutDecorator: Skips the automatic base.stpl layout wrapping for a specific route. This is perfect for returning
small HTML fragments for dynamic content swaps.- Clean Snippets: Easily return bare HTML snippets that integrate perfectly with HTMX's hx-target and hx-swap attributes.
Interactivity Out-of-the-Box
Running scribe new now generates a project that is interactive by default, with HTMX and SSE pre-configured and ready to use
immediately:
- Zero Configuration: The base.stpl layout now includes HTMX 2.x and the SSE extension by default—no manual script tags
required. - Automatic CSRF for HTMX: HTMX requests are automatically protected by Scribe's CSRF tokens without any additional setup.
- Comprehensive Demo App: Every new project now includes a "Showcase" section featuring live examples of HTMX dynamic
content, SSE counters, and live search—showing you exactly how to build interactive features without writing a single line
of JavaScript.