It's React, but in Python
Find a file
Mark Bakhit fb9c57f073
reactpy.run and configure(...) refactoring (#1051)
- Change `reactpy.backends.utils.find_all_implementations()` to first try to import `<backend_name>` before importing `reactpy.backend.<backend_name>`
   - Allows for missing sub-dependencies to not cause `reactpy.run` to silently fail
- Import `uvicorn` directly within `serve_with_uvicorn` in order to defer import.
   - Allows for `ModuleNotFound: Could not import uvicorn` exception to tell the user what went wrong
- Added `CommonOptions.serve_index_route: bool`
   - Allows us to not clutter the route patterns when it's not needed
   - There are real circumstances where a user might want the index route to 404
- Fix bug where in-use ports are being assigned on Windows.
   - Removes `allow_reuse_waiting_ports` parameter on `find_available_port()` 
- Rename `BackendImplementation` to `BackendProtocol`
- Change load order of `SUPPORTED_PACKAGES` so that `FastAPI` has a chance to run before `starlette`
- Rename `SUPPORTED_PACKAGES` to `SUPPORTED_BACKENDS`
- Refactor `reactpy.backend.*` code to be more human readable
- Use f-strings where possible
- Merge `if` statements where possible
- Use `contextlib.supress` where possible
- Remove defunct `requirements.txt` file
2023-07-18 02:15:08 -07:00
.github Update pull_request_template.md 2023-07-04 17:20:46 -06:00
branding
docs reactpy.run and configure(...) refactoring (#1051) 2023-07-18 02:15:08 -07:00
src reactpy.run and configure(...) refactoring (#1051) 2023-07-18 02:15:08 -07:00
.gitignore
.pre-commit-config.yaml V1.0.2 changelog (#1088) 2023-07-03 23:48:37 -06:00
CODE_OF_CONDUCT.md
LICENSE
pyproject.toml fix ruff error + pin ruff ver for now (#1107) 2023-07-15 12:32:24 -06:00
README.md
tasks.py

ReactPy

ReactPy is a library for building user interfaces in Python without Javascript. ReactPy interfaces are made from components that look and behave similar to those found in ReactJS. Designed with simplicity in mind, ReactPy can be used by those without web development experience while also being powerful enough to grow with your ambitions.

Supported Backends
Built-in External
Flask, FastAPI, Sanic, Tornado Django, Jupyter, Plotly-Dash

At a Glance

To get a rough idea of how to write apps in ReactPy, take a look at this tiny Hello World application.

from reactpy import component, html, run

@component
def hello_world():
    return html.h1("Hello, World!")

run(hello_world)

Resources

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