示例#1
0
def show():
    station_object = []
    station = Station.select()
    for i in station:
        station_object.append(
            {
                'id': i.id,
                'name': i.name
            }
        )
    return jsonify({
            "message": "Successfully update a new item.",
            "station_object": station_object
        }), 200
示例#2
0
def _load_bounds():
    stations = Station.select(lambda c: c.processed == False)[0:100]
    for station in stations:
        BoundParser(None, station=station).parse()
        commit()
    return len(stations)
示例#3
0
def _load_addresses():
    stations = Station.select(lambda c: c.processed_address == False)[0:100]
    for station in stations:
        AddressParser(None, station=station).parse()
    return len(stations)