[ANN] httpy 0.9.0 -- a sane and robust HTTP library for Python
Claudio Grondi
claudio.grondi at freenet.de
Fri Feb 24 13:30:59 EST 2006
Rene Pijlman wrote:
> Chad Whitacre:
>
>>I am pleased to announce the first public release of httpy -- a sane and
>>robust HTTP library for Python. With httpy, you write "responders," and
>>put them on the network with "couplers." Here is a trivial responder:
>>
>> import httpy
>>
>> class Responder:
>> def respond(request):
>> raise httpy.Response(200, "Greetings, program!")
>>
>>
>>And here is how to couple it:
>>
>> responder = Responder()
>> coupler = httpy.couplers.StandAlone(responder)
>> coupler.go()
>>
>>httpy is so amazing, in fact, that with it I was able to write an entire
>>wiki in only 20 seconds!
>
>
> Now that's what I call a short learning curve. So can this replace Zope
> then? Or mod_python? Apache? CGI? All of those?
>
The example given does not run on my system:
Traceback (most recent call last):
File "HowToUse_httpy.py", line 7, in ?
coupler = httpy.couplers.StandAlone(responder)
File
"C:\Python24\Lib\site-packages\httpy\couplers\standalone\coupler.py",
line 36, in __init__
responder = add_api(responder, root, uri)
File "C:\Python24\Lib\site-packages\httpy\couplers\utils.py", line
24, in add_api
verifyObject(IResponder, responder, tentative=True)
File "C:\Python24\Lib\site-packages\httpy\_zope\interface\verify.py",
line 96, in verifyObject
return _verify(iface, candidate, tentative, vtype='o')
File "C:\Python24\Lib\site-packages\httpy\_zope\interface\verify.py",
line 88, in _verify
raise BrokenMethodImplementation(name, mess)
httpy._zope.interface.exceptions.BrokenMethodImplementation: The
implementation of respond violates its contract
because implementation doesn't allow enough arguments.
What are the requirements? Zope?
Claudio
More information about the Python-list
mailing list