Source Code

These examples can be run directly in the browser or from any client which speaks HTTP.
You can also send data using tools like cURL.


import pprint
import logging
import microcule

log = logging.getLogger('echo-py')

def app(environ, start_response):
    start_response('200 OK', [('content-type', 'text/plain')])
    res = ["Hello, this is a Python script."]
    res.append("Hook['params'] is populated with request parameters")
    res.append("Hook['req'] is the http request")
    res.append(pprint.pformat(Hook['req']['url']))'hello logs')
    log.warn('%s', Hook['params'])
    return '\n'.join(res)

if __name__ == '__main__':

To make your own copy of this service or "Fork" it simply click the button. You will need to register for a Free Account, but it's very quick and easy!