1 #!/usr/bin/env python 2 3 # NOTE: Path manipulation requires manual customisation. 4 5 import sys 6 sys.path.append("/home/paulb/Software/Python/WebStack") 7 sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 8 9 from WebStack.Adapters import WSGI 10 from WebStack.Resources.Login import LoginResource, LoginAuthenticator 11 from wsgi_cgi import run_with_cgi 12 13 resource = LoginResource( 14 LoginAuthenticator( 15 secret_key="horses", 16 credentials=( 17 ("badger", "abc"), 18 ("vole", "xyz"), 19 ) 20 ) 21 ) 22 23 # Special magic incantation. 24 25 handler = WSGI.WSGIAdapter(resource) 26 run_with_cgi(handler) 27 28 # vim: tabstop=4 expandtab shiftwidth=4