I'd like to create a Python project using Azure Functions. When creating, files are allocated into the default layout (as recommended in documentation), so currently my project has the following structure:
root
| - function_1
| | - __init__.py
| | - function.json
| - function_2
| | - __init__.py
| | - function.json
| - function_N
| | - __init__.py
| | - function.json
| - src
| | - __init__.py
| | - logic
| - host.json
| - local.settings.json
| - requirements.txt
| - tests
The problem is that N might be relatively big (>=10), so in this way the project will become messy very quickly. I'd like the project to be of the following format, with functions being grouped into folders (eg for versioning purpose and just to keep them separately from the code):
root
| - v0
| | - function_1
| | | - __init__.py
| | | - function.json
| | - function_N
| | | - __init__.py
| | | - function.json
| - v1
| | - function_1
| | | - __init__.py
| | | - function.json
| | - function_M
| | | - __init__.py
| | | - function.json
| - src
| | - __init__.py
| | - logic
| - host.json
| - local.settings.json
| - requirements.txt
| - tests
or something close to it, the main aim is to separate functions into separate folders.
However when I'm trying to run a project with such a layout, I get message saying that "No job functions found", or "Unable to find project root. Expecting to find one of host.json, local.settings.json in project root.", if I move host.json to functions folder.
Is there a way to configure project to work with this custom layout, so that functions are discoverable from their grouping directories?
All my functions are HttpTriggers.
I'm using Python3.9.7 and Visual Studio Code Version: 1.63.2 with Azure Functions extension for Visual Studio Code v1.6.0




