Skip to content

Py4Js/pyscript-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyScript-React 🐍⚛️

GitHub Total alerts Language grade: JavaScript GitHub issues GitHub last commit

Alt

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

Documentation

we are working on it... 🐢

Related implementations/libraries

Libraries

PyScript-React-Folium

Implementations

PyScript-Solid

Contributing

Look here: CONTRIBUTING.md

Contributors

(https://github.com/Py4Js/PyScript-React/graphs/contributors)