Skip to content

Commit 9a485bd

Browse files
committed
CSR -> Pyodide
1 parent f0c47dc commit 9a485bd

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

docs/source/about/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Unreleased
1717

1818
**Added**
1919
- :pull:`1113` - Added ``reactpy.asgi.ReactPy`` that can be used to run ReactPy in standalone mode via ASGI.
20-
- :pull:`1269` - Added ``reactpy.asgi.ReactPyCSR`` that can be used to run ReactPy in standalone mode via ASGI, but rendered entirely client-sided.
20+
- :pull:`1269` - Added ``reactpy.asgi.ReactPyPyodide`` that can be used to run ReactPy in standalone mode via ASGI, but rendered entirely client-sided.
2121
- :pull:`1113` - Added ``reactpy.asgi.ReactPyMiddleware`` that can be used to utilize ReactPy within any ASGI compatible framework.
2222
- :pull:`1113` :pull:`1269` - Added ``reactpy.templatetags.Jinja`` that can be used alongside ``ReactPyMiddleware`` to embed several ReactPy components into your existing application. This includes the following template tags: ``{% component %}``, ``{% pyscript_component %}``, and ``{% pyscript_setup %}``.
2323
- :pull:`1269` - Added ``reactpy.pyscript_component`` that can be used to embed ReactPy components into your existing application.

src/reactpy/asgi/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from reactpy.asgi.executors.pyscript import ReactPyCSR
1+
from reactpy.asgi.executors.pyodide import ReactPyPyodide
22
from reactpy.asgi.executors.standalone import ReactPy
33
from reactpy.asgi.middleware import ReactPyMiddleware
44

5-
__all__ = ["ReactPy", "ReactPyCSR", "ReactPyMiddleware"]
5+
__all__ = ["ReactPy", "ReactPyMiddleware", "ReactPyPyodide"]
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from reactpy.types import ReactPyConfig, VdomDict
2020

2121

22-
class ReactPyCSR(ReactPy):
22+
class ReactPyPyodide(ReactPy):
2323
def __init__(
2424
self,
2525
*component_paths: str | Path,
@@ -33,7 +33,8 @@ def __init__(
3333
html_lang: str = "en",
3434
**settings: Unpack[ReactPyConfig],
3535
) -> None:
36-
"""Variant of ReactPy's standalone that only performs Client-Side Rendering (CSR).
36+
"""Variant of ReactPy's standalone that only performs Client-Side Rendering (CSR) via
37+
PyScript (using a Pyodide interpreter).
3738
3839
This ASGI webserver is only used to serve the initial HTML document and static files.
3940
@@ -62,7 +63,7 @@ def __init__(
6263
are not applicable to CSR and will have no effect.
6364
"""
6465
ReactPyMiddleware.__init__(
65-
self, app=ReactPyCSRApp(self), root_components=[], **settings
66+
self, app=ReactPyPyodideApp(self), root_components=[], **settings
6667
)
6768
if not component_paths:
6869
raise ValueError("At least one component file path must be provided.")
@@ -83,10 +84,10 @@ def match_dispatch_path(self, scope: WebSocketScope) -> bool:
8384

8485

8586
@dataclass
86-
class ReactPyCSRApp(ReactPyApp):
87+
class ReactPyPyodideApp(ReactPyApp):
8788
"""ReactPy's standalone ASGI application for Client-Side Rendering (CSR)."""
8889

89-
parent: ReactPyCSR
90+
parent: ReactPyPyodide
9091
_index_html = ""
9192
_etag = ""
9293
_last_modified = ""

0 commit comments

Comments
 (0)