Documentation

Guides for installing WebComPy and building your first app.

Operators' cheat sheet

Quick operational entry points for building, configuring, embedding, and testing apps:

  • CLI Reference — subcommands, flags, and headless browser inspection
  • Project Configuration — pyproject.toml dependencies, webcompy_config.py, resources, and lockfile
  • ASGI Integration — embedding in FastAPI/Starlette and mounting sub-apps
  • Serving Modes — CDN vs local runtime/wasm, wheel bundling, and offline deploys
  • Testing — TestRenderer, fake ports, ASGI helpers, and tier policy
For LLMs & AI Coding Agents

Machine-readable documentation indexes and context bundles for AI coding assistants:

  • /llms.txt — index only: overview, essential API cheat sheet, and .md links (smallest file, tens of KB)
  • /llms-small.txt — compact doc bundle (smaller alternative to llms-full.txt; inlines Getting Started, Basic Usage, and Server & Tooling, hundreds of KB)
  • /llms-full.txt — complete doc bundle: all documentation pages with runnable demo sources (~1 MB+)

Append .md to any documentation page URL (for example /documents/basic/components.md) to fetch clean Markdown directly.

Getting Started

What is WebComPy
Why WebComPy
Installation
Quickstart
Project Structure

Guides

Step 1: App Shell
Step 2: Components
Step 3: Navigation
Step 4: Forms
Step 5: Remote Data
Step 6: Deploy

Basic Usage

Components
HTML Templates
Reactive State
Elements & Events
Markdown Documents
HTTP & Async
Styling & Themes
Error Handling
UI Primitives
Overlay Components
Disclosure & Feedback

Advanced Usage

Read-only Signals and Events
Signals and Streams
Server-Sent Events
Typed Realtime
RPC Contracts
RPC over WebSocket
RPC Streaming
Hydration & Data Transfer
Async Rendering & Boundaries
Transition
Loading Screen
Styling Deep Dive
Progressive Web App
Dependency Injection Deep Dive
Middleware
Routing Deep Dive
Typed API Deep Dive
UI Headless Contract
Custom Elements
Persistence Patterns
Internationalization

Server & Tooling

CLI Reference
Project Configuration
ASGI Integration
Serving Modes

Examples

Hello World
Storage Sync
Transition
i18n Playground
Matplotlib
HTTP Fetch
Fetch Middleware
RPC Middleware

Migration

From Jinja2 + FastAPI
Compatibility Notes

API Reference

App & Components
Template & Markdown
Reactivity
Elements, Routing & DI
Data, Forms & i18n
UI & Theme
Server, CLI, RPC & Ports