Pip is used in Azure in order to build your project, and poetry is not currently supported there. By building the project locally you can use poetry instead. The main downside is that it means that the upload will be larger since you are including both your source and the dependencies. Specifically how to set this flag will depend on your deployment pipeline, but if you are using functions core tools you can use the --build local flag: func azure functionapp publish <APP_NAME> --build local
Publish function with poetry instead of requirements.txt
Gilberto Diaz
41
Reputation points
I have several functions within an Azure Function App. I have several dependencies I'm utilizing and I decided to use poetry instead of pip. That left me with a poetry.lock
file instead of requirements.txt
. After running...
$ func azure functionapp publish my-project
Getting site publishing info...
requirements.txt is not found. requirements.txt is required for python function apps. Please make sure to generate one before publishing.
Is it that poetry.lock
is not supported at all or there is a way to deploy utilizing poetry?
Accepted answer
-
Samara Soucy - MSFT 5,141 Reputation points
2021-11-18T02:01:41.59+00:00