Package couchdbkit :: Module external :: Class External
[hide private]
[frames] | no frames]

Class External

source code

object --+
         |
        External
Known Subclasses:

simple class to handle an external
ans send the response.

example:

    from couchdbkit.external import External
    from couchdbkit.utils import json 

    class Test(External):

        def handle_line(self, line):
            self.send_response(200, 
                "got message external object %s" % json.dumps(line),
                {"Content-type": "text/plain"})

    if __name__ == "__main__":
        Test().run()
    

Instance Methods [hide private]
 
__init__(self, stdin=sys.stdout, stdout=sys.stdout)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
handle_line(self, line) source code
 
write(self, line) source code
 
lines(self) source code
 
run(self) source code
 
send_response(self, code=200, body='', headers={}) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, stdin=sys.stdout, stdout=sys.stdout)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)