Hi,
Recently I had some problems to reference modules on my Azure Function and based on the closed issue #81 I found out I should use relative import syntax:
from . import example
I would like to recommend add a section about this on Create function - Python to improve developers experience so they don't need to spend time going to GitHub closed issues to figure out.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thanks for the feedback! We are currently investigating and will update you shortly.
Hello @fernandoBRS - Could you provide us with the URL of the issue where this was discussed again? The link you've given us in your feedback seems to be referencing a Pull Request that is unrelated to this topic. Moreover, given the scope of this doc, it might be better to add such details to the doc below instead:
Hi @mike-urnun-msft , sorry for the wrong issue number. This is the right one: https://github.com/Azure/azure-functions-python-worker/issues/81
@mike-urnun-msft totally agree with you to add it on the developer guide doc.
Thanks @fernandoBRS!
cc: @ggailey777 @asavaritayal
Hey @fernandoBRS - Thanks again for sharing your feedback and helping us drive improvements towards MS Docs! I've created a PR that adds following to the developer guide doc:
To reference modules local to a function, you can use the relative import syntax as follows:
from . import example
We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.
Most helpful comment
Hey @fernandoBRS - Thanks again for sharing your feedback and helping us drive improvements towards MS Docs! I've created a PR that adds following to the developer guide doc:
We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.