SQLite3 and web server

Chris Angelico rosuav at gmail.com
Fri Aug 21 09:27:10 CEST 2015

On Fri, Aug 21, 2015 at 5:13 PM, Cecil Westerhof <Cecil at decebal.nl> wrote:
> I know how to work with SQLite. What I do not know how to make a
> python web-server that accepts a request from the JavaScript code and
> responds with data from the SQLite3 database.

The request from JS will be some sort of HTTP transaction. It'll be
AJAX or similar, and to your web server, it'll simply be another page
request. (You might be using a method other than GET/POST (which are
the only two that regular page loads use), but it's still a standard
HTTP request.) You then respond to that request with data that you got
from the database.

Check out this video from PyCon. Its main thrust is "here's why
websockets are great, and why other technologies are insufficient",
but the background info is a tidy summary of how the web works.



More information about the Python-list mailing list