@app.route('/pypi/check_update/<dist_name>')
def check_pypi_update(dist_name):
    pkg_res = get_pkg_res()
    pkg_dist_version = pkg_res.get_distribution(dist_name).version
    pypi_rel = get_pypi_releases(dist_name)

    if pypi_rel:
        pypi_last_version = pkg_res.parse_version(pypi_rel[0])
        current_version = pkg_res.parse_version(pkg_dist_version)

        if pypi_last_version > current_version:
            DIST_PYPI_CACHE.add(dist_name.lower())
            return jsonify({"has_update": 1})

    try:
        DIST_PYPI_CACHE.remove(dist_name.lower())
    except KeyError:
        pass

    return jsonify({"has_update": 0})
Just check for updates and return a json
dataset/ETHPy150Open perone/stallion/stallion/main.py/check_pypi_update