from flask import Flask, request
import json
app = Flask(__name__)

@app.route('/', methods=['GET', 'POST'])
def index():
    metrics = json.loads(str(request.data, encoding='utf-8'))['metrics'];

    for metric in metrics:
        for field in metric['fields'].keys():

            print(metric['fields'][field])

    return "Hello Flask!"

if __name__ == "__main__":
    app.run(debug=True)


curl --request POST \
"https://103.212.227.42:8086/api/v2/write?org=Gmni&bucket=Gmni&precision=ns" \
  --header "Authorization: Token NkyEODmTkYH73ToOeUe70OFULccwO0R46Ze_QBjzWPoTPluZIli0hcc4ts3haimdo0XGtanMwkL9RWGhBkLtRg==" \
  --header "Content-Type: text/plain; charset=utf-8" \
  --header "Accept: application/json" \
  --data-raw 'curlTest,host="10.101.64.250" test="Potato",test_two=123 1679918120000000000' --insecure