Azure / azure-functions-python-library

Azure Functions Python SDK
MIT License
151 stars 63 forks source link

feat: Adding ability to invoke functions directly #238

Closed vrdmr closed 3 weeks ago

vrdmr commented 1 month 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!