I am essentially looking for the Python equivalent of the following
bash commands
If you check the python sdk of azure or check the REST API document of azure, you will find there is no Ready-made method.Basically, there are two situations to discuss:
If you want to deploy azure function to windows OS, then just use any python code to upload local function structure to related storage file share(The premise is that the function app has been created on azure.).
But if you want to deploy azure function to linux OS, then it will not be as simple as deploying to windows OS. It needs to perform additional packaging operations, and the specific logic may need to check the underlying implementation of azure cli.
A cop-out would be to just have the Python script run the shell
commands, but I am looking for a more elegant solution if one exists.
For Linux-based azure function, I think you don’t have to consider so much. It has many additional operations when deploy function app, so use command or run command by python to achieve this is more recommended(There is no ready-made python code or REST API that can do what you want.).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…