[英]Create an electron JS desktop app with python and react js
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.我想用 Electron JS 和表单前端创建一个桌面应用程序,我可以使用我熟悉的 React JS。 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.
我很好地掌握了 Python 我在互联网上检查过,但他们都希望我创建一个 API 并在本地运行它我可以这样做并连接到反应电子应用程序但对于分发,我还需要用户安装 Python。 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.
我知道我可以使用 node js 作为后端,但是我在 Python 中准备了很多工作,例如后端逻辑,并且该应用程序将在桌面上运行,无需为此连接到 Internet。 I need to know if I need user to install python as well.
我需要知道我是否还需要用户安装 python。 I don't want that.
我不想要那个。
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.我认为这正是您要寻找的,它是一个可重用的 Electron 模板,它使用带有 Redux 和 Redux Toolkit 的 React 前端,并与用于微服务的 Python/Flask 集成。 Packaging functions with build scripts are available for Windows and macOS.
带有构建脚本的打包函数可用于 Windows 和 macOS。
You can just copy the parts you need or clone the template and use it.您可以只复制您需要的部分或克隆模板并使用它。
https://github.com/iPzard/electron-react-python-template 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.如果您不希望用户必须安装 Python,那么您需要使用某些东西将其打包在一起。 Check out Pyinstaller, once you've created an exe it can be distributed and doesn't require the user to install Python
查看 Pyinstaller,一旦您创建了一个 exe,它就可以分发,并且不需要用户安装 Python
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.