Create an electron JS desktop app with python and react js

Viewed 3278

I want to create a desktop app with Electron JS and form front end I can use React JS as I'm familiar with it. I have a good grasp of Python I checked over the internet but they all wanted me to create an API and run it on local I can do that and connect to react electron app but for distribution, I need the user to install Python as well. I know I can go for node js as a backend but I have a lot of work ready in Python like backend logic and the app will run on desktop only no need to connect to Internet for that. I need to know if I need user to install python as well. I don't want that.

2 Answers

I think this is exactly what you're looking for, it's a reusable Electron template that uses a React front-end with Redux & Redux Toolkit, and is integrated with Python/Flask for microservices. Packaging functions with build scripts are available for Windows and macOS.

You can just copy the parts you need or clone the template and use it.

https://github.com/iPzard/electron-react-python-template

If you don't want the user to have to install Python then you need to use something to package it together. Check out Pyinstaller, once you've created an exe it can be distributed and doesn't require the user to install Python

https://www.pyinstaller.org/

Related