Re: [ANN] httpy 0.9.0 -- a sane and robust HTTP library for Python

Discussion in 'Python' started by Rene Pijlman, Feb 24, 2006.

  1. Rene Pijlman

    Rene Pijlman Guest

    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?

    --
    René Pijlman
     
    Rene Pijlman, Feb 24, 2006
    #1
    1. Advertising

  2. 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
     
    Claudio Grondi, Feb 24, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jack Jansen
    Replies:
    0
    Views:
    317
    Jack Jansen
    Sep 16, 2004
  2. GMane Python

    python sane imaging

    GMane Python, Dec 28, 2004, in forum: Python
    Replies:
    0
    Views:
    387
    GMane Python
    Dec 28, 2004
  3. Fredrik Lundh

    Re: python sane imaging

    Fredrik Lundh, Dec 28, 2004, in forum: Python
    Replies:
    0
    Views:
    469
    Fredrik Lundh
    Dec 28, 2004
  4. derek
    Replies:
    3
    Views:
    431
  5. Tony Arcieri
    Replies:
    2
    Views:
    192
    Tony Arcieri
    Mar 30, 2010
Loading...

Share This Page