Search code examples
pythonazureazure-devopsazure-functions

Can a normal Azure Function and a Durable Azure Function coexist in the same Function App?


I haven’t been able to find clear documentation on this topic.

Also, do all functions within a Function App need to be in the same function_app.py file, or can they be separated into different files? If separation is possible, how should the project structure look?

Any insights or references to documentation would be greatly appreciated!


Solution

  • Yes. In fact, in general you need a "normal" Function (e.g. HTTP trigger) to start the Durable Functions orchestrator.

    I haven't made Functions with Python, but it looks like you can split to multiple files: https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-python?tabs=get-started%2Casgi%2Capplication-level&pivots=python-mode-decorators#folder-structure.

    additional_functions.py: (Optional) Any other Python files that contain functions (usually for logical grouping) that are referenced in function_app.py through blueprints.

    It explains the concept of blueprints further here: https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-python?tabs=get-started%2Casgi%2Capplication-level&pivots=python-mode-decorators#blueprints