authorisation REST service in Python -


i quite new python world. since in design @ deciding phase whether choose python primary language implement software. task to: - implement set of restful web services - authorizing http methods group of users, required use xacml policies definition (or can standard) , saml info. exchange

thanks in advance recommendations, eric

if question libraries can use implement these restful services, have basehttpserver module of standard python library.

the following code shows how easy implement simple server accepting requests:

class myhandler(basehttprequesthandler):      def do_get(self):         try:             f = open(curdir + sep + self.path) #self.path has /test.html             self.send_response(200)             self.send_header('content-type',    'text/html')             self.end_headers()             self.wfile.write(f.read())             f.close()         except ioerror:             self.send_error(404,'file not found: %s' % self.path)  def main():     try:         server = httpserver(('', 80), myhandler)         print 'welcome machine...'         server.serve_forever()     except keyboardinterrupt:         print '^c received, shutting down server'         server.socket.close()  if __name__ == '__main__':     main() 

of course, code not myself, found here.


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

c# - how to write client side events functions for the combobox items -

ssh client with paramiko (python) -