【发布时间】:2021-02-18 05:11:35
【问题描述】:
是否可以直接从另一个 git azure repos 将模块导入 azure 函数?
而不是 https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python#folder-structure 建议的文件夹结构
__app__
| - my_first_function
| | - __init__.py
| | - function.json
| | - example.py
| - my_second_function
| | - __init__.py
| | - function.json
| - shared_code
| | - my_first_helper_function.py
| | - my_second_helper_function.py
| - host.json
| - requirements.txt
| - Dockerfile
tests
并使用类似的东西
from ..shared_code import my_first_helper_function
要导入模块,我想将所有 shared_code 保存在单独的 git 存储库中并从那里导入。
【问题讨论】:
-
谁说我投了反对票。我将您的问题编辑为 Python 问题,与 Azure 没有任何关系。
标签: python git azure-functions azure-repos