Python implementing simple web data storage
Question: I am trying to develop a python `PyQt` program that allow user to enter data
about personal particulars and review them at a later time for processing
purpose.

The program will be used by less than 5 persons at the same time. So, i am
thinking to use `Sqlite3` database as i believe it should be able to cope for
that amount of traffic.

The frame work i have in mind is that, the clients will have their own copy of
my python pyqt program on each machine. Whenever they perform any operations
that required data read/write, it will connect to the server thorough internet
and read/write from the `sqlite.db` on the server.

Basically, the server will be nothing but a remote data storage.

Currently, i am able to create the required `GUI` for data inputs by using
various widgets like `QlineEdit`, `QCombobox`, `QTextEdit` and so on.

But i have never done network programming before, thus i have no idea how to
implement a server that store the sqlite data file for my software. So my
questions are

(1) if i have a PC that has 24/7 internet connection, how do i set it up so
that it can act as a server that store the data file for my software?

(2)In what way can/should my program communicate to that server through
internet.

Even if you can't give me exact answer, i would appreciate if you can provide
me some information of so that i look up and study about it.

Any constructive advice will be appreciated.

FYI: all the PCs will be running windows XP SP3 32 bits.


Answer: There are different ways for a client to communicate with a server.

You can use

  1. [XMLRPC](http://docs.python.org/2/library/xmlrpclib.html) to create an object with methods that are called on the server side

  2. You can use HTTP and [REST](https://en.wikipedia.org/wiki/REST) for the server with the library [requests or urllib](http://stackoverflow.com/questions/2018026/should-i-use-urllib-or-urllib2-or-requests) for the client

  3. For the latter you can use flask, bottle, django or other frameworks to create a website that serves the content [(tutorials)](http://python.opentechschool.org/)

  4. You can use [Pyro](https://github.com/irmen/Pyro4) to remotely access the objects on the server. Useful if the clients should also communicate with eachother.

  5. You can create your own protocol. You will learn a lot and value the other options.

  6. _The list is not complete_

I suggest that you have a look at XMLRPC if that fits. For number 2 I can say
that many APIs use such a HTTP-interface (twitter, github, facebok, google).
It is easy to use also for other people.

**Security** is important. I am not an expert. If you send username and
password in plain text then use SSL to encrypt the connection. If you can not
get ssl to work with python you can use
[stunnel](https://www.stunnel.org/index.html).

