3. Vehicles

Sample request

Sample response

{
    "data": [
        {
            "vehicleid": 19100,
            "vehicleregno": "KA53F0007",
            "responsecode": 200
        },
        {
            "vehicleid": 18830,
            "vehicleregno": "KA57F0007",
            "responsecode": 200
        }
    ],
    "Message": "Success",
    "Issuccess": true,
    "exception": null,
    "RowCount": 2,
    "responsecode": 200
}

Functions


source

fetch_vehicles

 fetch_vehicles (pattern:str='', sleep_duration:float=0.1)

Fetch vehicles matching the given registration number pattern from BMTC API.


source

process_vehicles

 process_vehicles (vehicles)

Process and clean vehicle data, returning a DataFrame with vehicle_id and registration_number.


source

task_fetch_vehicles

 task_fetch_vehicles (data_directory:pathlib.Path)

source

get_vehicles

 get_vehicles (data_directory:pathlib.Path)