chain of responsibility pattern you could easily create user class that gets stored in database as an exerciselook at the sqlalchemy project (an sqlite database where you store basic user data make sure the user class has class function that finds user based on the user token fieldwhich is unique setting up wsgi server let' make this little more practical since you already have pip running on your systeminstall uwsgi on your virtual environmentpip install uwsgi windows users might receive an error messageattributeerrormodule 'oshas no attribute 'uname'for this and in you will need to install cygwin make sure to select the python interpreterpip gcc-corepython -devel (check that you select your windows version- -bit/ -bit)libcrypt-develand wget from the options during the cygwin install process you can get it at install html cygwin is linux-like terminal for windows you can navigate using default linux commandssuch as the pip install uwsgi command you could also follow the virtualenv setup instructions from to set up virtual environment in cygwin (the activate command is located in yourenvnamescriptsif all of this seems like way too much effortyou would do well to install virtualbox and run ubuntu on the box thenyou can follow the linux path completelywithout any changes in your day-to-day environment let' test that the server works and can serve up websites on your machine the following script returns very simple status success and hello world message in the body (from the uwsgi documentation at latest/wsgiquickstart htmlhello_world_server py def application(envstart_response)start_response(' ok'[('content-type','text/html')]return [ "hello world"