Skip to content

Do not expose protobuf to the bindings #135

@pragnagopa

Description

@pragnagopa

Tracking issue to investigate decoupling azure.functions and azure.functions.worker.

Use type annotations if the function expects a custom type such as
singnalRConnectionInfo which is not a basic type like: string or byte[] or rich binding type defined in azure-functions-python-library

def main(req: func.HttpRequest, connectionInfo: signalRConnectionInfo) -> func.HttpResponse:
    return func.HttpResponse(connectionInfo)

Python worker needs to convert the input data sent by the functions host to the type requested by the function. This is the goal of issue #135 as well.

Here is the flow for the above example:

  • User function includes reference to the library where signalRConnectionInfo is defined
  • On function invocation, host sends input data as String/Json
  • Python worker examines the type annotation and converts input data to type signalRConnectionInfo
  • If type conversion fails, throw error

Metadata

Metadata

Assignees

Labels

P1[P1] items : Ship blocking

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions