コード例 #1
0
def hello(zipcode):
    print("success!")
    response = ''
    if df is not None:
        response = showRatingDistribution(df, zipcode).to_json()

    return Response(response,
                    mimetype='application/json',
                    headers={
                        'Cache-Control': 'no-cache',
                        'Access-Control-Allow-Origin': '*'
                    })
コード例 #2
0
def hello(platform):
    df = data.get(platform, None)
    print("success!")
    response = ''
    if df is not None:
        response = showRatingDistribution(df, platform).to_json()

    return Response(response,
                    mimetype='application/json',
                    headers={
                        'Cache-Control': 'no-cache',
                        'Access-Control-Allow-Origin': '*'
                    })
コード例 #3
0
def hello(platform):
    df = data.get(platform, None)
    response = ''
    # return "Got the platform type '{}', and rating '{}'.".format(platform,rating)
    if df is not None:
        response = showRatingDistribution(df[['name', 'rating']],
                                          platform).to_json()

    return Response(response,
                    mimetype='application/json',
                    headers={
                        'Cache-Control': 'no-cache',
                        'Access-Control-Allow-Origin': '*'
                    })