Example #1
0
def filtered_table():
    payload = request.json
    print(payload)
    filters = process.filter_builder(payload["filters"])
    print(filters)
    data = process.table_builder(payload["table"], filters)
    if data.empty == False:
        info_tabla = data.to_dict()

    else:
        info_tabla = "no info"

    obj = {'status': 'OK', 'data': {'table': info_tabla}}
    return jsonify(obj)
Example #2
0
def retrieve_departamentos():
    municipios = process.table_builder("departments")
    return {'status': 'OK', 'data': municipios.to_dict()}
Example #3
0
def retrieve_factors(table):
    factors = process.table_builder(table)
    return {'status': 'OK', 'data': {'topics': factors.to_dict()}}
Example #4
0
def retrieve_municipios():
    municipios = process.table_builder("municipalities")
    return {'status': 'OK', 'data': municipios.to_dict()}