Github

PyView Examples

Basic Counter

Gotta start somewhere, right? This example shows how to send click events to the backend to update state. We also snuck in handling URL params.

Source Code

Basic Counter with PubSub

The counter example, but with PubSub. Open this example in multiple windows to see the state update in real time across all windows.

Source Code

Volume Control

Keyboard events!

Source Code

Registration Form Validation

Form validation using Pydantic

Source Code

More Form Validation

Source Code

Table Pagination

Table Pagination, and updating the URL from the backend.

Source Code

Podcasts

URL Parameters, client navigation updates, and dynamic page titles.

Source Code

Realtime Status Dashboard

Pushing updates from the backend to the client.

Source Code

JS Commands

JS Commands let you update the DOM without making a trip to the server.

Source Code

Web Ping

Another example of pushing updates from the backend to the client.

Source Code

Presence

A simple example of presence tracking. Open this example in multiple windows.

Source Code

Maps

A simple example of using Leaflet.js with PyView, and sending information back and forth between the liveview and the JS library.

Source Code

File Upload

File upload example, with previews and progress bars.

Source Code

Kanban Board

A simple Kanban board example with drag and drop (another hooks example showing integration w/ SortableJS).

Source Code

Template Includes

This example shows how to include templates in other templates.

Source Code