Installing ReactPy#

You will typically pip install ReactPy to alongside one of it’s natively supported backends. For example, if we want to run ReactPy using the Starlette backend you would run

pip install "reactpy[starlette]"

If you want to install a “pure” version of ReactPy without a backend implementation you can do so without any installation extras. You might do this if you wanted to use a custom backend or if you wanted to manually pin the dependencies for your chosen backend:

pip install reactpy

Native Backends#

ReactPy includes built-in support for a variety backend implementations. To install the required dependencies for each you should substitute starlette from the pip install command above with one of the options below:

If you need to, you can install more than one option by separating them with commas:

pip install "reactpy[fastapi,flask,sanic,starlette,tornado]"

Once this is complete you should be able to run ReactPy with your chosen implementation.

Other Backends#

While ReactPy can run in a variety of contexts, sometimes frameworks require extra work in order to integrate with them. In these cases, the ReactPy team distributes bindings for those frameworks as separate Python packages. For documentation on how to install and run ReactPy in these supported frameworks, follow the links below:



Plotly Dash

For Development#

If you want to contribute to the development of ReactPy or modify it, you’ll want to install a development version of ReactPy. This involves cloning the repository where ReactPy’s source is maintained, and setting up a Development Environment. From there you’ll be able to modifying ReactPy’s source code and run its tests to ensure the modifications you’ve made are backwards compatible. If you want to add a new feature to ReactPy you should write your own test that validates its behavior.

If you have questions about how to modify ReactPy or help with its development, be sure to start a discussion. The ReactPy team are always excited to welcome new contributions and contributors of all kinds

Read More

Learn more about how to contribute to the development of ReactPy.