I tried to create a new logic directory under the Python Function directory generated by CIL to place some logic, but I can't seem to reference it? So currently Function can only be run as a single file, right? Or maybe I missed something
Hi - I think it can be done, maybe take a look here? https://github.com/open-runtimes/examples/tree/main/python/send_message/functions
Thanks, I added before the quote . It works, but it's a bit weird
[SOLVED]A Function only support Single Python File ?
The dot? It's a relative import because the path is a little different in the runtime container
I got this problem again on reading file , usually it will work on with open('templates.txt','r') , but i try
many ways to call be failed
I'm not really sure if this works but, what if you do this?:
import os
folder = os.path.dirname(os.path.realpath(__file__))
file = os.path.join(folder, 'templates.txt')
open(file,'r')
this can be solved, thans!
[SOLVED] A Function only support Single Python File ?
Recommended threads
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...