-
Notifications
You must be signed in to change notification settings - Fork 450
How to manage shared code #1987
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Did you take a look at this? It works for me. Not very clear as the comments say so but once you figure out the example it will work.
and the following imports will work from within any of the
|
The difference between function apps and functions is confusing to say the least (and there are no such things on the other platforms). The above example "works" but is not ideal. We wanted separate function apps for separate managed identities. Also, how many functions can fit in a functions app? We currently have four but are planning to add many more and without the possibility to share code between functions apps all with end up in the same function app. In an ideal world I would not like to manage the function app at all. |
Hello, I faced the same problem of folder structure. Here the Folder Structure I use. (Almost what you propose but without test in SharedCode, and setup.py)
I created the simlink with :
requirements.txt in FunctionApp1 look like
|
@NVolcz are you still experiencing this issue? |
We gave up on trying to use Python with Azure Functions after not receiving any help on this issue. |
@NVolcz Did you see my answer? |
Closing as duplicate of Azure/azure-functions-host#5373. The Python team is working on a new programming model. |
I have a bunch of Azure Python Function Apps that share some code and is not sure how I am sure how this is supposed work. The shared code is proprietary and cannot be uploaded to PyPi. My issue is similar to: Azure/azure-functions-python-worker#219
This is how I would like the folder structure to look like:
I have tried to use the
file:
protocol in FunctionApp1 and FunctionApp2's requirements.txt:file:../SharedCode
Most tooling understands this except for
pip freeze
. Skipping thefile:
part also seems works well with other tooling but neither does not work well withfunc
. Remote build and--build-native-deps
cannot build these function apps since they do not get access to the SharedCode folder, only the functions individual folders. I have therefor tried to build locally. It seems like the first problem with this lies with the packapp script: https://github.com/Azure/azure-functions-core-tools/blob/dev/tools/python/packapp/__main__.py#L73-L79This SO thread seems related: https://stackoverflow.com/questions/11147667/is-there-a-way-to-list-pip-dependencies-requirements
pip download outputs this:
What should I do?
The text was updated successfully, but these errors were encountered: