cloud-functions-emulator icon indicating copy to clipboard operation
cloud-functions-emulator copied to clipboard

Plans for python?

Open andres-lowrie opened this issue 6 years ago • 3 comments

I notice that this doesn't support the python runtime yet...

Are there plans for python support or will that be handled by something else (some other project) ?

andres-lowrie avatar Aug 21 '18 15:08 andres-lowrie

It shouldn't be hard to run a python connector I would wager. Could use most of the code here...

dovy avatar Sep 14 '18 16:09 dovy

so we're currently doing something like this:

from flask import Flask, request

from main import handle

app = Flask(__name__)


def wrapper():
    return handle(request)


wrapper.provide_automatic_options = False
wrapper.methods = ['GET', 'POST', 'PUT', 'DELETE']
app.add_url_rule('/', 'index', wrapper)

if __name__ == '__main__':
    app.run()

This has been working for us thus far... I'll look at the codebase and see how to integrate

andres-lowrie avatar Sep 19 '18 18:09 andres-lowrie

@andres-lowrie Thank you for this great piece of code!

myselfhimself avatar Nov 12 '18 17:11 myselfhimself