pyscript-react-cjs
v0.0.4
Published
![GitHub](https://img.shields.io/github/license/Py4Js/PyScript-React) [![Total alerts](https://img.shields.io/lgtm/alerts/g/ShootGan/PyAnalize-React.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ShootGan/PyAnalize-React/alerts/) [![Language gra
Downloads
1
Readme
PyScript-React 🐍⚛️
PyScript-React integrates PyScript library into react components. Making it easier to use inside your react projects 😊
Peer dependencies
Required by whole library: react, prop-types
Required by PyScriptProvider, and PyScriptProviderZustandWrapper: react-helmet-async
Required by PyScriptProviderZustandWrapper: zustand
Try it
yarn add pyscript-react # installation with yarn (preferred node package manager)
npm i pyscript-react # installation with npm
pnpm add pyscript-react # installation with pnpm
Example hello world
<PyScriptProvider>
<PyScript>display("Hello world!")</PyScript>
</PyScriptProvider>
Example integration with folium
<PyScriptProvider>
<PyScript
source="/folium_map.py",
output="folium"
generateOutputTag
pyConfigProps={{
type: "json",
packages: new Set(["folium"]),
}}
/>
</PyScriptProvider>
# folium_map.py
from folium import Map
variable = Map(location=[45.5236, -122.6750])
display(variable, target="folium")
Documentation
we are working on it... 🐢
Related implementations/libraries
Libraries
Implementations
Contributing
Look here: CONTRIBUTING.md