I'm not sure if you are using JQuery at all but you should use AJAX to make calls to the python api.
Jquery Method: http://api.jquery.com/jQuery.ajax/
$.ajax({
type: "POST", //OR GET
url: yourapiurl,
data: datatosend,
success: success, //Callback when request is successful that contains the SQlite data
dataType: dataType
});
Javascript Method: http://www.w3schools.com/ajax/ajax_xmlhttprequest_send.asp
xmlhttp=new XMLHttpRequest();
xmlhttp.open("POST",yourapiurl,true);
xmlhttp.send();
The responseText attribute of the XMLHttpRequest be populated with the SQlite data from the api