Reputation: 305
What is the simplest way for making a Python script run in a webserver and allow me to call it passing a parameter and grabbing the value that the script ends up with?
I am thinking that this is what is normally refered to as an API, but not sure how to implement this in the most simple way.
The application from which I would be calling this python script is ManyChat, through its feature "external requests" which allows me to use GET or POST parameters, but I don't know how I would turn my python script into a web queriable api.
I took a look online and found some articles about Python + Flask but it seems a solution for scenario where SQL database is involved in the operations. However my python script will NOT need to communicate with any SQL database so I am wondering if there is a simpler solution
Upvotes: 0
Views: 110
Reputation: 3858
Flow control could be as follows:
/api
on your web serverrequests.get('myserver.com/api?p1=v1&p2=v2')
@app.route('/api')
Upvotes: 1