Skip to content

Commit fce5cc0

Browse files
committed
rename idom to reactpy
1 parent e9c6f3c commit fce5cc0

File tree

237 files changed

+2465
-1918
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+2465
-1918
lines changed

.github/ISSUE_TEMPLATE/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Start a Discussion
4-
url: https://github.com/idom-team/idom/discussions
4+
url: https://github.com/reactpy-team/reactpy/discussions
55
about: Report issues, request features, ask questions, and share ideas

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# --- Build Artifacts ---
2-
src/idom/_client
2+
src/reactpy/_client
33

44
# --- Jupyter ---
55
*.ipynb_checkpoints

MANIFEST.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
recursive-include src/idom/_client *
2-
recursive-include src/idom/web/templates *
3-
include src/idom/py.typed
1+
recursive-include src/reactpy/_client *
2+
recursive-include src/reactpy/web/templates *
3+
include src/reactpy/py.typed

README.md

+15-16
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
# IDOM · [![Tests](https://github.com/idom-team/idom/workflows/test/badge.svg)](https://github.com/idom-team/idom/actions?query=workflow%3ATest) [![PyPI Version](https://img.shields.io/pypi/v/idom.svg)](https://pypi.python.org/pypi/idom) [![License](https://img.shields.io/badge/License-MIT-purple.svg)](https://github.com/idom-team/idom/blob/main/LICENSE)
1+
# ReactPy · [![Tests](https://github.com/reactpy-team/reactpy/workflows/test/badge.svg)](https://github.com/reactpy-team/reactpy/actions?query=workflow%3ATest) [![PyPI Version](https://img.shields.io/pypi/v/reactpy.svg)](https://pypi.python.org/pypi/reactpy) [![License](https://img.shields.io/badge/License-MIT-purple.svg)](https://github.com/reactpy-team/reactpy/blob/main/LICENSE)
22

3-
IDOM connects your Python web framework of choice to a ReactJS frontend, allowing you to create **interactive websites without needing JavaScript!**
3+
ReactPy connects your Python web framework of choice to a ReactJS frontend, allowing you to create **interactive websites without needing JavaScript!**
44

5-
Following ReactJS styling, web elements are combined into [reusable "components"](https://idom-docs.herokuapp.com/docs/guides/creating-interfaces/your-first-components/index.html#parametrizing-components). These components can utilize [hooks](https://idom-docs.herokuapp.com/docs/reference/hooks-api.html) and [events](https://idom-docs.herokuapp.com/docs/guides/adding-interactivity/responding-to-events/index.html#async-event-handlers) to create infinitely complex web pages.
5+
Following ReactJS styling, web elements are combined into [reusable "components"](https://reactpy-docs.herokuapp.com/docs/guides/creating-interfaces/your-first-components/index.html#parametrizing-components). These components can utilize [hooks](https://reactpy-docs.herokuapp.com/docs/reference/hooks-api.html) and [events](https://reactpy-docs.herokuapp.com/docs/guides/adding-interactivity/responding-to-events/index.html#async-event-handlers) to create infinitely complex web pages.
66

7-
When needed, IDOM can [use components directly from NPM](https://idom-docs.herokuapp.com/docs/guides/escape-hatches/javascript-components.html#dynamically-loaded-components). For additional flexibility, components can also be [fully developed in JavaScript](https://idom-docs.herokuapp.com/docs/guides/escape-hatches/javascript-components.html#custom-javascript-components).
7+
When needed, ReactPy can [use components directly from NPM](https://reactpy-docs.herokuapp.com/docs/guides/escape-hatches/javascript-components.html#dynamically-loaded-components). For additional flexibility, components can also be [fully developed in JavaScript](https://reactpy-docs.herokuapp.com/docs/guides/escape-hatches/javascript-components.html#custom-javascript-components).
88

9-
Any Python web framework with Websockets can support IDOM. See below for what frameworks are supported out of the box.
10-
11-
| Supported Frameworks | Supported Frameworks (External) |
12-
| --- | --- |
13-
| [`Flask`, `FastAPI`, `Sanic`, `Tornado`](https://idom-docs.herokuapp.com/docs/guides/getting-started/installing-idom.html#officially-supported-servers) | [`Django`](https://github.com/idom-team/django-idom), [`Plotly-Dash`](https://github.com/idom-team/idom-dash), [`Jupyter`](https://github.com/idom-team/idom-jupyter) |
9+
Any Python web framework with Websockets can support ReactPy. See below for what frameworks are supported out of the box.
1410

11+
| Supported Frameworks | Supported Frameworks (External) |
12+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
13+
| [`Flask`, `FastAPI`, `Sanic`, `Tornado`](https://reactpy-docs.herokuapp.com/docs/guides/getting-started/installing-reactpy.html#officially-supported-servers) | [`Django`](https://github.com/reactpy-team/django-idom), [`Plotly-Dash`](https://github.com/reactpy-team/idom-dash), [`Jupyter`](https://github.com/reactpy-team/idom-jupyter) |
1514

1615
# At a Glance
1716

18-
To get a rough idea of how to write apps in IDOM, take a look at this tiny _Hello World_ application.
17+
To get a rough idea of how to write apps in ReactPy, take a look at this tiny _Hello World_ application.
1918

2019
```python
21-
from idom import component, html, run
20+
from reactpy import component, html, run
2221

2322
@component
2423
def HelloWorld():
@@ -31,8 +30,8 @@ run(HelloWorld)
3130

3231
Follow the links below to find out more about this project.
3332

34-
- [Try it Now](https://mybinder.org/v2/gh/idom-team/idom-jupyter/main?urlpath=lab/tree/notebooks/introduction.ipynb) - check out IDOM in a Jupyter Notebook.
35-
- [Documentation](https://idom-docs.herokuapp.com/) - learn how to install, run, and use IDOM.
36-
- [Community Forum](https://github.com/idom-team/idom/discussions) - ask questions, share ideas, and show off projects.
37-
- [Contributor Guide](https://idom-docs.herokuapp.com/docs/developing-idom/contributor-guide.html) - see how you can help develop this project.
38-
- [Code of Conduct](https://github.com/idom-team/idom/blob/main/CODE_OF_CONDUCT.md) - standards for interacting with this community.
33+
- [Try it Now](https://mybinder.org/v2/gh/reactpy-team/idom-jupyter/main?urlpath=lab/tree/notebooks/introduction.ipynb) - check out ReactPy in a Jupyter Notebook.
34+
- [Documentation](https://reactpy-docs.herokuapp.com/) - learn how to install, run, and use ReactPy.
35+
- [Community Forum](https://github.com/reactpy-team/reactpy/discussions) - ask questions, share ideas, and show off projects.
36+
- [Contributor Guide](https://reactpy-docs.herokuapp.com/docs/developing-reactpy/contributor-guide.html) - see how you can help develop this project.
37+
- [Code of Conduct](https://github.com/reactpy-team/reactpy/blob/main/CODE_OF_CONDUCT.md) - standards for interacting with this community.

branding/svg/idom-logo-backed-square.svg

+1-1
Loading

branding/svg/idom-logo-backed.svg

+1-1
Loading

branding/svg/idom-logo-square-small.svg

+1-1
Loading

branding/svg/idom-logo-square.svg

+1-1
Loading

branding/svg/idom-logo.svg

+1-1
Loading

docs/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN python3 -m venv $VIRTUAL_ENV
1515
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
1616
RUN pip install --upgrade pip
1717

18-
# Install IDOM
18+
# Install ReactPy
1919
# ------------
2020
COPY requirements ./requirements
2121
RUN pip install -r requirements/build-docs.txt
@@ -44,6 +44,6 @@ RUN sphinx-build -v -W -b html docs/source docs/build
4444
# Define Entrypoint
4545
# -----------------
4646
ENV PORT 5000
47-
ENV IDOM_DEBUG_MODE=1
48-
ENV IDOM_CHECK_VDOM_SPEC=0
47+
ENV ReactPy_DEBUG_MODE=1
48+
ENV ReactPy_CHECK_VDOM_SPEC=0
4949
CMD python scripts/run_docs.py

docs/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# IDOM's Documentation
1+
# ReactPy's Documentation
22

33
We provide two main ways to run the docs. Both use `nox` which has a `noxfile.py` at the
44
root of the repository. Running the docs with `nox -s docs` will start up an iteractive
5-
session which will rebuild the docs any time a file is modified. Using `nox -s
6-
docs_in_docker` on the other hand, will build a docker image and run the docs from
5+
session which will rebuild the docs any time a file is modified. Using `nox -s docs_in_docker` on the other hand, will build a docker image and run the docs from
76
there. The latter command mimics how the docs will behave in production. As such, if any
87
changes to the core of the documentation are made (i.e. to non-`*.rst` files), then you
98
should run a manual test of the documentation using the `docs_in_docker` session.

docs/app.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33

44
from sanic import Sanic, response
55

6-
from idom import component
7-
from idom.backend.sanic import Options, configure, use_request
8-
from idom.core.types import ComponentConstructor
6+
from reactpy import component
7+
from reactpy.backend.sanic import Options, configure, use_request
8+
from reactpy.core.types import ComponentConstructor
99

1010
from .examples import get_normalized_example_name, load_examples
1111

1212

1313
HERE = Path(__file__).parent
14-
IDOM_MODEL_SERVER_URL_PREFIX = "/_idom"
14+
ReactPy_MODEL_SERVER_URL_PREFIX = "/_reactpy"
1515

1616
logger = getLogger(__name__)
1717

1818

19-
IDOM_MODEL_SERVER_URL_PREFIX = "/_idom"
19+
ReactPy_MODEL_SERVER_URL_PREFIX = "/_reactpy"
2020

2121

2222
@component
@@ -52,7 +52,7 @@ async def forward_to_index(request):
5252
configure(
5353
app,
5454
Example,
55-
Options(url_prefix=IDOM_MODEL_SERVER_URL_PREFIX),
55+
Options(url_prefix=ReactPy_MODEL_SERVER_URL_PREFIX),
5656
)
5757

5858
return app

docs/examples.py

+18-14
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
from traceback import format_exc
66
from typing import Callable, Iterator
77

8-
import idom
9-
from idom.types import ComponentType
8+
import reactpy
9+
from reactpy.types import ComponentType
1010

1111

1212
HERE = Path(__file__)
1313
SOURCE_DIR = HERE.parent / "source"
1414
CONF_FILE = SOURCE_DIR / "conf.py"
15-
RUN_IDOM = idom.run
15+
RUN_ReactPy = reactpy.run
1616

1717

1818
def load_examples() -> Iterator[tuple[str, Callable[[], ComponentType]]]:
@@ -95,7 +95,7 @@ def capture_component(component_constructor):
9595
nonlocal captured_component_constructor
9696
captured_component_constructor = component_constructor
9797

98-
idom.run = capture_component
98+
reactpy.run = capture_component
9999
try:
100100
code = compile(file.read_text(), str(file), "exec")
101101
exec(
@@ -109,20 +109,24 @@ def capture_component(component_constructor):
109109
except Exception:
110110
return _make_error_display(format_exc())
111111
finally:
112-
idom.run = RUN_IDOM
112+
reactpy.run = RUN_ReactPy
113113

114114
if captured_component_constructor is None:
115115
return _make_example_did_not_run(str(file))
116116

117-
@idom.component
117+
@reactpy.component
118118
def Wrapper():
119-
return idom.html.div(captured_component_constructor(), PrintView())
119+
return reactpy.html.div(captured_component_constructor(), PrintView())
120120

121-
@idom.component
121+
@reactpy.component
122122
def PrintView():
123-
text, set_text = idom.hooks.use_state(print_buffer.getvalue())
123+
text, set_text = reactpy.hooks.use_state(print_buffer.getvalue())
124124
print_buffer.set_callback(set_text)
125-
return idom.html.pre(text, class_name="printout") if text else idom.html.div()
125+
return (
126+
reactpy.html.pre(text, class_name="printout")
127+
if text
128+
else reactpy.html.div()
129+
)
126130

127131
return Wrapper()
128132

@@ -159,16 +163,16 @@ def write(self, text: str) -> None:
159163

160164

161165
def _make_example_did_not_run(example_name):
162-
@idom.component
166+
@reactpy.component
163167
def ExampleDidNotRun():
164-
return idom.html.code(f"Example {example_name} did not run")
168+
return reactpy.html.code(f"Example {example_name} did not run")
165169

166170
return ExampleDidNotRun()
167171

168172

169173
def _make_error_display(message):
170-
@idom.component
174+
@reactpy.component
171175
def ShowError():
172-
return idom.html.pre(message)
176+
return reactpy.html.pre(message)
173177

174178
return ShowError()

docs/source/_custom_js/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Custom Javascript for IDOM's Docs
1+
# Custom Javascript for ReactPy's Docs
22

33
Build the javascript with
44

docs/source/_custom_js/package-lock.json

+27-27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/source/_custom_js/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "idom-docs-example-loader",
2+
"name": "reactpy-docs-example-loader",
33
"version": "1.0.0",
44
"description": "simple javascript client for IDOM's documentation",
55
"main": "index.js",
@@ -15,6 +15,6 @@
1515
"rollup": "^2.35.1"
1616
},
1717
"dependencies": {
18-
"idom-client-react": "file:../../../src/client/packages/idom-client-react"
18+
"@reactpy/client": "file:../../../src/client/packages/@reactpy/client"
1919
}
2020
}

0 commit comments

Comments
 (0)