Azure / azure-functions-python-library

Azure Functions Python SDK
MIT License
155 stars 67 forks source link

feat: Adding ability to invoke functions directly #238

Closed vrdmr closed 3 months ago

vrdmr commented 3 months ago

The function allows direct calling of Functions using the Python interpreter

import azure.functions as func
import logging

app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)

@app.route(route="http_trigger")
def http_trigger(req: func.HttpRequest) -> func.HttpResponse:
    return "Hello, World!"

print(http_trigger(None))
➜ python function_app.py
Hello, World!