Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Unable to use azure SDKs with python #164
Created a vanilla HTTP function (works):
import logging import azure.functions as func def main(req: func.HttpRequest) -> func.HttpResponse: logging.info('Python HTTP trigger function processed a request.') return func.HttpResponse('Hello', status_code=200)
I then installed the Azure SDK
When I try to reference one of these SDKs it throws errors for naming conficts
import azure.mgmt.compute import azure.mgmt.network.models import azure.mgmt.storage.models
Tested this on latest func cli and it's working now so can close. As any FYI my requirements.txt when not working had this:
But now has this
I actually ran into this reference to GitHub too, had issues when publishing when this was still in the requirement.txt file. Wrote something about it here, where I was struggling as well.
Maybe someone can explain why it is setup like this and not just a normal reference as Jeff says here as well?
Update: Apparently this is already changed in the latest version of the cli. Just created a new function and my requirements are now listed as:
@rvanmaanen thanks for blogging about this! Just ran through your post and most of the rough edges you ran into earlier should now be fixed. Let us know about your experience when you give it a shot next. Happy to connect further on any feedback and recommendations you might have :)
PS Python on v2 is not yet officially supported hence it's not mentioned on the docs. We're treating the feature as still in-development.