Skip to content

How it works

static page<Image>

One file. The whole stack.

Pulse is a real status page built to exercise every Pyxle feature — Python loaders and React UI in the same .pyxl file, server-rendered and hydrated. This page itself is statically generated.

A live signal waveform

The feature map

Everything Pulse demonstrates

Server

  • File-based routing

    Static, dynamic [id], nested

    /incidents/[id]
  • @server loaders

    Async data, colocated in the page

    every page
  • ISR caching

    { data, revalidate } envelope

    / status
  • Static generation

    No loader · pyxle build --static

    this page
  • @action + Pydantic

    Typed body, 422 field errors

    /report
  • Background tasks

    Work after the response

    /report · subscribe
  • error.pyxl + LoaderError

    Status-aware boundary

    unknown incident

Realtime

  • WebSockets

    websocket(ws) in the page file

    incident war room
  • pyxle.realtime

    channel() pub/sub broadcast

    live timeline
  • useWebSocket

    status · send · lastMessage

    live room
  • Streaming SSR

    Shell-first · loading.pyxl

    /incidents/*

Client

  • <Image>

    CLS-safe, lazy, priority

    this page
  • <Script>

    Self-hosted, afterInteractive

    keyboard shortcuts
  • <Form>

    Progressive enhancement

    subscribe below
  • useAction

    pending · error · fields

    /report
  • <Head> / <Link> / navigate

    Per-page meta · SPA nav

    everywhere
  • <ClientOnly>

    Hydration-safe relative time

    timestamps

Platform

  • pyxle-auth

    useAuth · session · responder sign-in

    /responders
  • pyxle-db

    Migrations · transactions

    data layer
  • Observability

    request-id · Prometheus metrics

    /api/__pulse/metrics
  • Rate limiting

    Token bucket, config-driven

    600 / min
  • Custom middleware

    Server-Timing header

    every response
  • API routes

    pages/api/*.py

    /api/healthz

The request flow

How a request travels

Every request enters the same middleware stack, then fans out into one of three lanes — a cached page render, a validated action, or a realtime socket.

Diagram: a Pulse request flows through the Starlette middleware stack, then into the page, action, or WebSocket lane.

Read the source

It really is just Python

No magic. Open any surface in the demo and the code is exactly what you'd expect.

Stay in the loop

<Form>Pydanticbackground task

Get notified about incidents

This form posts to a Pydantic-validated @action and works even without JavaScript. A bad address comes back inline; a good one queues a confirmation.

See it liveRead the docs ↗