code: def status(host=None, port=None):
      
      app.config['HOST'] = first_value(host, app.config.get('HOST',None), '0.0.0.0')
      app.config['PORT'] = int(first_value(port, app.config.get('PORT',None), 5001))
      if app.config['HOST'] == "0.0.0.0": 
          host="127.0.0.1"
      else:
          host = app.config['HOST']
      port = app.config['PORT']    
      try:
          rep = requests.get('http://%s:%s/api/status' % (host,port))
          if rep.status_code == 200:
              try:
                  rep = json.loads(rep.text)
                  for k in rep:
                      print('%s\t: %s' % (k, rep[k]))
              except:
                  print('web server is not flaskserver', file=sys.stderr)
          else:
              print('web server is not flaskserver', file=sys.stderr)
      except:
          print('web server is not started', file=sys.stderr)
docs: status web server