Skip to content

Latest commit

History

History
20 lines (16 loc) 路 531 Bytes

File metadata and controls

20 lines (16 loc) 路 531 Bytes
from appwrite.client import Client
from appwrite.services.proxy import Proxy
from appwrite.models import ProxyRule

client = Client()
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
client.set_project('<YOUR_PROJECT_ID>') # Your project ID
client.set_key('<YOUR_API_KEY>') # Your secret API key

proxy = Proxy(client)

result: ProxyRule = proxy.create_function_rule(
    domain = '',
    function_id = '<FUNCTION_ID>',
    branch = '<BRANCH>' # optional
)

print(result.model_dump())