Metadata-Version: 2.4
Name: pyjs-examples
Version: 0.3.0
Summary: Official example applications for PyJS.
Author-email: Lex Berezhny <lex@damoti.com>
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://pyjs.org
Project-URL: Source, https://github.com/pyjs/pyjs
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.14
Description-Content-Type: text/markdown
Requires-Dist: pyjs==0.3.0
Provides-Extra: issue-tracker
Requires-Dist: django<6.2,>=6.0; extra == "issue-tracker"
Requires-Dist: pydantic<3,>=2; extra == "issue-tracker"
Requires-Dist: uvicorn<1,>=0.52; extra == "issue-tracker"
Provides-Extra: test
Requires-Dist: pytest>=9.0; extra == "test"

# PyJS Examples

This directory is the source tree for the separately installable
`pyjs-examples` distribution. Setuptools maps this directory to the
`pyjs_examples` import package, so the examples remain easy to browse in the
repository while installing as an ordinary top-level package.

From the repository root, install the core and examples from a source checkout:

```bash
uv sync
```

An installed PyJS release provides the same package through the `examples`
extra:

```bash
python -m pip install "pyjs[examples]"
```

Run each complete application with the command shown:

- [Calculator](calculator/): `python -m pyjs_examples.calculator`
- [Chatroom](chatroom/): `python -m pyjs_examples.chatroom`
- [Django issue tracker](issue_tracker/):
  `python -m pyjs_examples.issue_tracker`
- [Kanban board](kanban/): `python -m pyjs_examples.kanban`
- [Navigation workspace](navigation/):
  `python -m pyjs_examples.navigation`
- [NativeScript Counter](nativescript_counter/):
  `python -m pyjs_examples.nativescript_counter`
- [Space Invaders](space_invaders/):
  `python -m pyjs_examples.space_invaders`
- [TodoMVC](todomvc/): `python -m pyjs_examples.todomvc`
- [Component workspace](workspace/): `python -m pyjs_examples.workspace`
- [Component catalog](catalog.py): `python -m pyjs_examples.catalog`

List or copy examples using the core scaffolding command:

```bash
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.

The [focused samples](samples/) are small, executable sources intended for
documentation excerpts and `pyjs create PROJECT --template NAME`. The initial
catalog includes `pyjs_examples.samples.state_counter` and
`pyjs_examples.samples.ui_dialog`.
