
My main function is named main.py but I also have a utility.py (in the same directory) for my function.
For testing, my utility.py only contains: def simple_test(): print("Simple test function in utility.py")
In my main.py, I am trying to import with: from utility import simple_test
But it fails during exectution with: File "/usr/local/server/src/function/main.py", line 18, in <module> from utility import simple_test ModuleNotFoundError: No module named 'utility'
What is the correct syntax for importing from a separate file?
Recommended threads
- Urgent: Functions randomly failing with ...
Hi all, I’m facing a critical issue with my Appwrite self-hosted instance where some of my functions have randomly started failing with the following error: `I...
- Is there migration script generation lik...
Having standards migration script is helpful. For example something like same script to apply for multiple DB - each DB for one tenant
- Querying and filtering on relationship a...
Hello! A few short months ago, we decided to migrate from SupaBase over to Appwrite, because we were experiencing a lot of headache with the former when it fina...
