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.

Download files

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

Source Distribution

pyjs_examples-0.4.0.tar.gz (922.8 kB view details)

Uploaded Source

Built Distribution

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

pyjs_examples-0.4.0-py3-none-any.whl (936.4 kB view details)

Uploaded Python 3

File details

Details for the file pyjs_examples-0.4.0.tar.gz.

File metadata

  • Download URL: pyjs_examples-0.4.0.tar.gz
  • Upload date:
  • Size: 922.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for pyjs_examples-0.4.0.tar.gz
Algorithm Hash digest
SHA256 7a11eba7fb1f1e27ada5624422405828aacfc1bd744cb581f1654b8ec39e1201
MD5 cf672043e0c8a195041b041820a103d2
BLAKE2b-256 4967e4045f790842cff3fe70fcff31bd72f16b74a9e0ac1497e77d7b897fc22e

See more details on using hashes here.

File details

Details for the file pyjs_examples-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pyjs_examples-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 936.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for pyjs_examples-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c834f867fbe759a325fe2ddb2837b9c3ee4c08c3045e3372e5acfb4f49820e79
MD5 ba7982da1ad575d5bd496d69af3dfe26
BLAKE2b-256 ae557d60fe0ebb119cff38e463c9fc8114b8b57419d0633b0018bca80bb9f794

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.0

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

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