how to access Flask REST API from other python app

Solution
from flask import Flask, jsonify
app = Flask(__name__)

@app.get('/get_my_data')
def get_my_data():
    return jsonify(message: 'this is my data')
>> export FLASK_APP=myapi.py
>> export FLASK_ENV=development
>> flask run