Category: How do I do X?
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Can i run pyhton scripts directly on appsmith?

Issue

I have a Python script that I want to run directly on Appsmith, but there doesn't seem to be an option for this. I asked if it's possible and was informed that currently, Appsmith only supports JavaScript code. I considered using Flask APIs to run the Python script on Appsmith, but I haven't tried it yet. My use case is to automate a process that requires running the Python script with inputs as files and making API calls. I'm currently using a file widget and JS script within Appsmith, but also looking into using webhooks with Zapier or n8n. Another option I'm exploring is using script-server with the Appsmith local API functionality, but I'm running into some issues.

Resolution

It is currently not possible to run Python scripts directly on Appsmith. The only supported language is JavaScript. One option is to create an API using Flask (Python) and consume it on Appsmith using the API datasource. Alternatively, you can use a file widget and create a JS script to automate the bulk requests and API calls. If you want to automate this with a particular action, you can use Zapier or n8n and create a workflow using webhooks. Another option is to use script-server, which is a web app for executing self-hosted Python scripts. However, this requires some setup and may not be the most efficient solution.