Skip to content

Py4Js/pyscript-react

This branch is 5 commits ahead of main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a91139b Β· Dec 14, 2023

History

51 Commits
Dec 14, 2023
May 3, 2023
May 3, 2023
Aug 9, 2023
Dec 14, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
Aug 9, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
Jul 27, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
May 3, 2023
Jul 27, 2023

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)