Skip to main content

PyJS Examples

This directory is the source tree for the separately installable pyjs-examples distribution. Setuptools maps it to the pyjs_examples import package while keeping each application easy to browse in the repository.

Install the core and examples from a source checkout:

uv sync

An installed release provides the examples through an extra:

python -m pip install "pyjs[examples]"

Application responsibilities

The examples progress from small programs to composed, full-stack systems. Features may overlap when that makes an application more realistic.

Example Role Principal PyJS coverage
Counter Smallest app DOM, events, one-file tests
Calculator Universal app Web, PWA, Android, SSR, state
Components UI reference Widgets, forms, navigation
Notes Personal app Web, Android, drag/drop, restore
Chat Real-time starter WebSockets, multi-window, plans
Store Business app Django, JSON:API, SSE, themes, cursor feeds
Space Invaders GPU game WebGPU, input, render tests

Run an application with its module name, for example:

python -m pyjs_examples.calculator
python -m pyjs_examples.components
python -m pyjs_examples.notes
python -m pyjs_examples.chat
python -m pyjs_examples.store

Install pyjs-examples[store] before running Store from a release package.

Calculator and Notes accept --android to build and launch their NativeScript versions. Their default command serves the web version.

Components is also the source and test surface for the planned website component reference. It combines the former catalog, workspace, navigation, and focused dialog sample in one application.

Notes combines the former Kanban board with the mobile notes application. It uses DOM-owned ordering, drag/drop, server restoration, and visual tests.

Store is the canonical Django and typed client/server example. It also owns the themability story, signed cursor feeds, infinite scrolling, and data-driven charts.

Templates

List, inspect, or copy examples using the core scaffolding command:

pyjs template
pyjs template pyjs_examples.calculator
pyjs create my-calculator --template pyjs_examples.calculator
pyjs create --single-file my_counter.py --template pyjs_examples.counter

The distribution registers modules and packages through the pyjs.templates entry-point group. PyJS infers file and directory templates from normal Python module structure instead of hardcoding a catalog.

Metadata

Release files for pyjs-examples 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyjs-examples 0.4.0
File Size Uploaded
pyjs_examples-0.4.0.tar.gz 922.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyjs-examples 0.4.0
File Interpreter ABI Platform
pyjs_examples-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.9 MB

Release files / pyjs_examples-0.4.0.tar.gz

Download URL pyjs_examples-0.4.0.tar.gz
Size 922.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7a11eba7fb1f1e27ada5624422405828aacfc1bd744cb581f1654b8ec39e1201
BLAKE2b-256 checksum
How to use checksums
4967e4045f790842cff3fe70fcff31bd72f16b74a9e0ac1497e77d7b897fc22e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / pyjs_examples-0.4.0-py3-none-any.whl

Download URL pyjs_examples-0.4.0-py3-none-any.whl
Size 936.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c834f867fbe759a325fe2ddb2837b9c3ee4c08c3045e3372e5acfb4f49820e79
BLAKE2b-256 checksum
How to use checksums
ae557d60fe0ebb119cff38e463c9fc8114b8b57419d0633b0018bca80bb9f794
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.0.2

2 release files

0.0.1

2 release 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