|
| 1 | +# PyScript-React 🐍⚛️ |
| 2 | + |
| 3 | + |
| 4 | +[](https://lgtm.com/projects/g/ShootGan/PyAnalize-React/alerts/) |
| 5 | +[](https://lgtm.com/projects/g/ShootGan/PyAnalize-React/context:javascript) |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +## PyScript-React integrates [PyScript](https://github.com/pyscript/pyscript) library into react components. Making it easier to use inside your react projects 😊 |
| 12 | + |
| 13 | +## Peer dependencies |
| 14 | + |
| 15 | +Required by whole library: react, prop-types |
| 16 | +Required by PyScriptProvider, and PyScriptProviderZustandWrapper: react-helmet-async |
| 17 | +Required by PyScriptProviderZustandWrapper: zustand |
| 18 | + |
| 19 | +## Try it |
| 20 | + |
| 21 | +```sh |
| 22 | +yarn add pyscript-react # installation with yarn (preferred node package manager) |
| 23 | +npm i pyscript-react # installation with npm |
| 24 | +pnpm add pyscript-react # installation with pnpm |
| 25 | +``` |
| 26 | + |
| 27 | +### Example hello world |
| 28 | + |
| 29 | +```tsx |
| 30 | +<PyScriptProvider> |
| 31 | + <PyScript>print("Hello world!")</PyScript> |
| 32 | +</PyScriptProvider> |
| 33 | +``` |
| 34 | + |
| 35 | +### Example integration with folium |
| 36 | + |
| 37 | +```tsx |
| 38 | +<PyScriptProvider> |
| 39 | + <PyScript |
| 40 | + output="folium" |
| 41 | + generateOutputTag |
| 42 | + pyEnvContent={["folium"]} |
| 43 | + src="./folium_map.py" |
| 44 | + /> |
| 45 | +</PyScriptProvider> |
| 46 | +``` |
| 47 | + |
| 48 | +```py |
| 49 | +# folium_map.py |
| 50 | +from folium import Map |
| 51 | + |
| 52 | +variable = Map(location=[45.5236, -122.6750]) |
| 53 | +variable |
| 54 | +``` |
| 55 | + |
| 56 | +## Documentation |
| 57 | + |
| 58 | +[Documentation](https://py4js.github.io/pyscript-react) |
| 59 | + |
| 60 | +`we are working on it... 🐢` |
| 61 | + |
| 62 | +## Related implementations/libraries |
| 63 | + |
| 64 | +### Libraries |
| 65 | + |
| 66 | +[PyScript-React-Folium]() |
| 67 | + |
| 68 | +### Implementations |
| 69 | + |
| 70 | +[PyScript-Solid]() |
| 71 | + |
| 72 | +## Contributing |
| 73 | + |
| 74 | +Look here: [CONTRIBUTING.md](https://github.com/Py4Js/PyScript-React/blob/main/CONTRIBUTING.md) |
| 75 | + |
| 76 | +## Contributors |
| 77 | + |
| 78 | + |
0 commit comments