Executing python scripts using Tauri #1645
-
Hello there, I am new to Tauri, I am currently building an application using Electron, but finding it to be a power hungry beast and found this project, which seems to solve this issue! Anyway my main question; my application involves executing a number of python scripts as I need to analyse documents using NLP and python is the language for this. Does anyone know of a tutorial or package out there similar to this one https://efficientcoder.net/using-python-with-electron-tutorial/ for Electron that shows you how to execute a python script in Tauri. Thank you for your help and guidance. Jacob |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
you can add python runtime as a sidecar to be bundled with your app and then use tauri's command api to spawn it, execute python code and get the result. If you don't want to bundle the python runtime you can just require your users to have python installed and added to the PATH in their OS. |
Beta Was this translation helpful? Give feedback.
-
Please someone should help create a boilerplate that works in 2024, I'm currently trying to set up a Tauri + NextJS + FastAPI, will come drop a link to template if I'm able to figure it out. |
Beta Was this translation helpful? Give feedback.
you can add python runtime as a sidecar to be bundled with your app and then use tauri's command api to spawn it, execute python code and get the result.
If you don't want to bundle the python runtime you can just require your users to have python installed and added to the PATH in their OS.