This release is a pre-release and may not be stable for production use.
PyReact Forge — React for Python
Build browser user interfaces with Python components and React hooks. Python runs in the browser through Pyodide/WebAssembly, while the real React renderer handles state, reconciliation and DOM updates. Static export does not require a Python application server for event handling.
Alpha 0.1.0a1 · MIT framework · Python 3.11+ CLI
Documentation · Installation · API reference · Compatibility
from pyreact_forge import component, html, use_state
@component
def App():
count, set_count = use_state(0)
return html.button(
f"Clicked {count} times",
on_click=lambda: set_count(lambda previous: previous + 1),
)
Install and start
After this version is published on PyPI:
python -m pip install "pyreact-forge==0.1.0a1"
pyreact-forge init my-app
cd my-app
pyreact-forge dev
Before the first upload, install from this source folder with python -m pip install ., or install the supplied wheel. Open the local URL printed by the
CLI. Node is not needed for ordinary app development with the packaged browser
runtime; Node 22+ is required for SSR and framework runtime rebuilds.
What is included
- Function/class components, Python object state and keyed lists.
- State, reducer, effect, context, ref, memo, callback, external-store and ID hooks.
- Deferred/transition, optimistic, action-state, form-status and effect-event adapters.
- HTML/SVG/custom elements, controlled forms, CSS and native RTL attributes.
- Suspense resources, lazy components, portals, error boundaries and Activity.
- Optional History API routing and registered JavaScript React components.
- Static builds plus Node/Pyodide server rendering and browser hydration.
- Searchable tutorials, task-app walkthrough, API/CLI/config references and troubleshooting with an explicit tested-capability matrix.
How the Python frontend works
Decorated Python components become React component types. Elements are real React elements, hooks call React's dispatcher, and Python callbacks run locally in the browser. The project is a Python API and bridge on React, not an independent implementation of its reconciler.
Python browser code is public client code. Keep private credentials, trusted operations and authorization on an appropriate backend. The alpha has no Python RSC/Flight protocol, React Compiler equivalent or state-preserving Fast Refresh. The application exporter currently expects origin-root hosting. See the matrix for adapters with limited scenario coverage.
Build for static hosting
pyreact-forge vendor
pyreact-forge build --offline
pyreact-forge serve
Serve the complete dist/ over HTTP/HTTPS with a route fallback. Extra Python
packages must be compatible with Pyodide and can introduce their own downloads.
See deployment
and SSR.
Develop the framework and docs
python -m pip install -e .
python -m pip install -r requirements-docs.txt -r requirements-release.txt
python -m unittest discover -s tests -v
python scripts/generate_api.py --check
python -m zensical build --strict
python scripts/check_docs.py
For full SSR/browser checks, install the locked Node dependencies and follow
testing. For runtime changes, run npm run build:runtime
and commit the generated bundles with the source change.
Contribute and license
Read CONTRIBUTING.md, SECURITY.md and the capability matrix. Provide small reproductions and full tracebacks when reporting a bug.
Framework source is MIT. Bundled React is MIT; optional Pyodide is MPL 2.0 with additional upstream component licenses. See third-party notices.
Metadata
Release files for pyreact-forge 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyreact_forge-0.1.0a1.tar.gz | 368.5 kB | With provenance | Details for pyreact_forge-0.1.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyreact_forge-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details for pyreact_forge-0.1.0a1-py3-none-any.whl |
Total release size: 607.9 kB
Release files / pyreact_forge-0.1.0a1.tar.gz
| Download URL | pyreact_forge-0.1.0a1.tar.gz |
|---|---|
| Size | 368.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45138818115929cc4a554a7cd10e5ed02a370eebc218a5f0dd3ef23eeceedae2
|
|
BLAKE2b-256 checksum How to use checksums |
336782e680c7a9c2b44e6257b70d6a28c37614e2d1f5d8ba947341e4a00c7b61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logRelease files / pyreact_forge-0.1.0a1-py3-none-any.whl
| Download URL | pyreact_forge-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 239.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae7259d7cd39b9bc71a6c4d709705f6f3a5a2f31c72b89a8356bb2e77ac1e27d
|
|
BLAKE2b-256 checksum How to use checksums |
d44bc86e4942cb474668816df4a3631f1870ba1b51d6b731d58f0b8e29aa775c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logSecurity for pyreact-forge 0.1.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pyreact_forge-0.1.0a1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.