title: Build a RESTful API server using FLASK?
body: <p>I have a python function which takes a JSON object as an input and returns a 'YES/NO' output. Now, I am trying to convert it into an API server, so that another API can call it, pass the JSON and my API server can return a 'YES/NO'.</p>
  
  <p>I read about Flask-RESTFul and looked at few examples. But all of them are written from the perspective of API client, like an API to read a todo list or read data from a db etc. </p>
  
  <p>Could someone give an example of 2 small scripts - one acting as an API server and another acting as an API client. The API client calls the API server and passes on the following JSON - </p>
  
  <pre><code>{'fruit_1':'apple', 'fruit_2':'melon'}
  </code></pre>
  
  <p>and the API server returns 'apple' as an output.</p>
  
  <p>Thanks in advance!</p>