简体   繁体   English

使用 python 创建一个电子 JS 桌面应用程序并响应 js

[英]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

https://www.pyinstaller.org/ https://www.pyinstaller.org/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 可以使用 Java 和 Electron JS 创建桌面应用程序吗? - It is possible to create a Desktop app using Java and Electron JS? 无法使用 Electron JS 使用桌面应用程序创建新文件夹 - Unable to create new folder using Desktop App using Electron JS Electron js 未渲染反应构建 web 应用程序 - Electron js not rendering react built web app 测试咖啡馆+电子+创建反应应用程序没有正确加载bundle.js - test cafe + electron + create-react-app not loading bundle.js properly 使用create-react-app时如何获取电子文件的打字稿 - How to get typescript for electron.js file when using create-react-app 你能在 Windows 任务计划程序中从 react 本机桌面应用程序(或任何其他 js 框架)创建任务吗 - Can you create tasks in the Windows Task Scheduler from a react native desktop app (or any other js framework) 无法使用带有 electron 应用程序的 Node JS 创建新文件夹和文件 - Can't create new folders and files with Node JS with electron app React js Electron - 无限期加载 - React js Electron - loading indefinitely 即使在新窗口上调用 show() 函数后,Electron js 桌面应用程序也不显示 - Electron js desktop app not showing even after calling show() function on new window create-react-app React Js 的漏洞 - Vulnerabilities with create-react-app React Js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM