Skip to main content

Client-side Python SPA framework via Pyodide

Project description

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

  • Signals-first reactivity: Fine-grained updates with create_signal, create_effect, create_memo, and batch.
  • Virtual DOM: Function components with efficient diffing and reconciliation.
  • 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, Index, Switch, Match, and Dynamic for declarative rendering.
  • Error boundaries and Suspense: Graceful error handling and async loading states.
  • 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


@component
def Counter(initial: int = 0):
    count, set_count = create_signal(initial)

    def render():
        return div(
            p(f"Count: {count()}"),
            button("Increment", on_click=lambda e: set_count(count() + 1)),
        )

    return render

Documentation

Visit docs.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

Project details


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.17.0.tar.gz (68.2 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.17.0-py3-none-any.whl (52.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wybthon-0.17.0.tar.gz
  • Upload date:
  • Size: 68.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wybthon-0.17.0.tar.gz
Algorithm Hash digest
SHA256 056ea7ce074e976056e8bbf0b6e2a318e1ec59439b667e8a0ecf37b92803eef2
MD5 c895423ecad2f5f6dfbc804220d7b892
BLAKE2b-256 16f8382ff1a933228981f664b2d27f6781575729e9cb7c27d7dbe01d343c8d33

See more details on using hashes here.

Provenance

The following attestation bundles were made for wybthon-0.17.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.17.0-py3-none-any.whl.

File metadata

  • Download URL: wybthon-0.17.0-py3-none-any.whl
  • Upload date:
  • Size: 52.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wybthon-0.17.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f4d03e789d72c080da65aa5c046c4eed0c8cfdfe4f2d03631d9e6717f04323c
MD5 5ad8944f29a481ada9b8646591d47ad1
BLAKE2b-256 a76a6730494276408b88913d80e273f40762d7514cd2676e0dbfba78b9214307

See more details on using hashes here.

Provenance

The following attestation bundles were made for wybthon-0.17.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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page