sdk-for-python/docs/examples/postgresql/list-branches.md at main · appwrite/sdk-for-python · GitHub
Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 532 Bytes

list-branches.md

File metadata and controls

18 lines (14 loc) · 532 Bytes
from appwrite.client import Client
from appwrite.services.postgresql import Postgresql
from appwrite.models import DedicatedDatabaseBranchList

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

postgresql = Postgresql(client)

result: DedicatedDatabaseBranchList = postgresql.list_branches(
    database_id = '<DATABASE_ID>'
)

print(result.model_dump())