Title question says it all. I was trying to figure out how I could go about integrating the database created by sqlite3 and communicate with it through Python from my website.
If any further information is required about the development environment, please let me know.
Use XMLHttpRequest (https://en.wikipedia.org/wiki/XMLHttpRequest) to call your python script and put the results back in your webpage.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With