0

I have a rails application and I need to run specific python scripts from it to perform API calls. for example, I have a script that creates a user in a certain platform, so I need to pass the user info from the front of my web app normally as JSON, back to the rails backend and to finally execute the python script while passing that JSON as input in it. I have seen similar questions but they don't put some emphasis on the input thing.

My question is, is it possible? and would it work for scripts that are going to be executed multiple times (such as listing data on a dashboard that can be refreshed multiple times)

1 Answers1

0

JSON is just a string, yes it's possible to execute a script from Ruby passing it a string.

smathy
  • 26,283
  • 5
  • 48
  • 68