The action in httpy is in the responders, but the couplers are the workhorses that put responders on the network. httpy includes three couplers out of the box. There are multiple Python webservers available, and a couple Python FastCGI libraries too. I've tried to pick the single most mature option in each category, and build the couplers on top of those. These decisions are purely pragmatic.
| responder) |
| responder) |
| responder[, argv]) |
sys.argv is used. See the chapter on the
httpy executable for the available options. This class
is defined in the httpy.couplers.standalone module. Each coupler takes a (possibly implicit) provider of the IResponder interface as its first argument, and each provides the following method:
| ) |
As an example, here is what a CGI script looks like with httpy:
#!/usr/local/bin/python """This is a CGI script. """ from httpy.couplers.cgi import CGI import myresponder coupled = CGI(myresponder) coupled.go()
Those wishing to implement new couplers are invited to consult the source code, and to contact the author.
httpy is Zeta software. It is copyright © 2006 by Chad Whitacre, and is offered free of charge, warranty, and restrictions.