appwrite/docs/examples/0.15.x/server-python/examples/functions/create-deployment.md

16 lines
486 B
Markdown
Raw Normal View History

2022-06-21 08:03:50 +00:00
from appwrite.client import Client
2022-08-29 12:09:22 +00:00
from appwrite.input_file import InputFile
2022-06-21 08:03:50 +00:00
from appwrite.services.functions import Functions
client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
)
functions = Functions(client)
2022-06-28 11:21:28 +00:00
result = functions.create_deployment('[FUNCTION_ID]', '[ENTRYPOINT]', InputFile.from_path('file.png'), False)