Skip to main content

Wybthon

Build interactive web apps in Python, no JavaScript required.

CI Release PyPI Version Python Versions License: MIT Docs

Documentation · Getting Started · Examples · Contributing


Overview

Wybthon is a client-side SPA framework that lets you build interactive web applications entirely in Python. Powered by Pyodide, it runs in the browser and provides a signals-first reactive model inspired by SolidJS. With fine-grained reactivity, a virtual DOM, component model, routing, forms, and context, you can write modern frontends without touching JavaScript.

Features

  • Run-once components + reactive holes: function bodies run a single time at mount. Embed a signal getter anywhere in your VNode tree and the reconciler wires it as a reactive hole: only that DOM node updates when the signal changes. No React-style re-renders.
  • Signals-first reactivity: Fine-grained updates with create_signal, create_effect, create_memo, and untrack, with automatic batching: writes apply immediately and effects run once per flush.
  • Async-first: Pass an async def to create_memo for async data; Loading boundaries show fallbacks, later refetches serve the stale value while revalidating, and action plus optimistic state cover mutations.
  • Virtual DOM: Function components with efficient, batched diffing, amortising the Pyodide ↔ JS bridge cost while keeping SolidJS-style fine-grained updates above it.
  • Client-side router: Path parameters, query parsing, Link component, and programmatic navigation.
  • Context API: Share state across the component tree with create_context and use_context.
  • Forms and validation: Built-in form state management with validators and two-way bindings.
  • Flow control primitives: Show, For, Repeat, Switch, Match, and Dynamic for declarative rendering.
  • Error and loading boundaries: ErrorBoundary for graceful error handling and Loading for declarative async fallbacks.
  • Dev server with hot reload: wyb dev launches a local server with SSE-based auto-reload.

Quick Start

Installation

pip install wybthon

Usage

from wybthon import button, component, create_signal, div, p, span


@component
def Counter(initial: int = 0):
    count, set_count = create_signal(initial)
    # The body runs ONCE.  ``count`` is a reactive hole, so only the
    # text node inside the span updates when the signal changes.
    return div(
        p("Count: ", span(count)),
        button("Increment", on_click=lambda e: set_count(count() + 1)),
    )

Documentation

Visit wybthon.com for the full documentation, including getting started guides, core concepts, API reference, and working examples.

Contributing

Contributions are welcome. Please see CONTRIBUTING.md for setup instructions, coding standards, and guidelines for submitting pull requests.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wybthon-0.28.0.tar.gz (155.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wybthon-0.28.0-py3-none-any.whl (119.0 kB view details)

Uploaded Python 3

File details

Details for the file wybthon-0.28.0.tar.gz.

File metadata

  • Download URL: wybthon-0.28.0.tar.gz
  • Upload date:
  • Size: 155.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for wybthon-0.28.0.tar.gz
Algorithm Hash digest
SHA256 75a0e15d454d6c99a8025a11828f9cc74c07a9945801944e31d67ce1e6abd0ba
MD5 24151b433f61cf2b0022e3be003c4d6d
BLAKE2b-256 8b45dc5edfbc1f70583790c6549f04eb93e1776d396e276c25a3cad2f10adc3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for wybthon-0.28.0.tar.gz:

Publisher: release.yml on wybthon/wybthon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wybthon-0.28.0-py3-none-any.whl.

File metadata

  • Download URL: wybthon-0.28.0-py3-none-any.whl
  • Upload date:
  • Size: 119.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for wybthon-0.28.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9df83a6502ab376877d19ccafe0e0c095c5ab791069b8e6390eb2bf1229d8c3
MD5 f140b1a7ff59b0551a322125edb80a7e
BLAKE2b-256 aae500aa5a36d1aeeb1a328fe7b2dfc3ece929283887c40d52941daa9c18ec4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for wybthon-0.28.0-py3-none-any.whl:

Publisher: release.yml on wybthon/wybthon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.32.0

2 files

0.31.0

2 files

0.30.0

2 files

0.29.0

2 files

This release

0.28.0 This release

2 files

0.27.0

2 files

0.26.0

2 files

0.25.0

2 files

0.24.0

2 files

0.23.1

2 files

0.23.0

2 files

0.22.0

2 files

0.21.0

2 files

0.20.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page