Referencing modules
See original GitHub issueCurrently, any file / module references in main.py
have to be with respect to the top level function app.
For e.g. -
FunctionApp
|__ HttpTrigger1
|__ function.json
|__ main.py
|__ model.pkl
|__ host.json
|__ requirements.txt
# main.py
import os
import azure.functions
def main(req: azure.functions.HttpRequest):
# file reference wrt top level function app
f = open('HttpTrigger1/model.pkl', 'rb')
Can we have relative paths instead? E.g. - f = open('model.pkl', 'rb')
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Referencing module texts - The Open University
This activity will focus on how you create a reference to a module text. Which referencing style? There are lots of different referencing...
Read more >APA References and Citations - Modules - Academic Guides
The introduction to references and citations modules on this page offer students the opportunity to learn the basics of APA references and citations....
Read more >Q. How do I cite modules or materials from courses?
No official format for citing online classroom materials exists - we do have a recommended format to use in citing such documents that...
Read more >Referencing objects defined in modules - IBM
You can reference module objects by 3-part, 2-part, or sometimes 1-part names. Resolution of name references is done deterministically and depends on the...
Read more >Citing and referencing: University course materials
Not all lecturers approve the use of Unit materials, such as lecture slides, in assignments. Check with your lecturer first to see if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Modules should be imported using the relative import syntax:
Hi,
My issue is if I want to import a function say function1 in module1 of SharedCode, but for me the SharedCode is inside the API folder, like below
The functions are defined inside module1 and module2
Usually I’d have done
from ShareCode.module1 import function1
That does not work.
from .ShareCode.module1 import function1
also gives module not found error, shown belowCan anyone help