This commit is contained in:
Jake Barnby committed 2025-08-20 19:22:48 +12:00
1 parent 50d61679bf
commit 920ffefd0c
1920 files changed
+20085 -5926

No files matched your search

@@ -4,7 +4,7 @@ from appwrite.services.databases import Databases
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
client.set_session('') # The user session to authenticate with
databases = Databases(client)
@@ -4,7 +4,7 @@ from appwrite.services.databases import Databases
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
client.set_session('') # The user session to authenticate with
databases = Databases(client)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.create_boolean_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
default = False, # optional
array = False # optional
)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.create_datetime_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
default = '', # optional
array = False # optional
)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.create_email_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
default = 'email@example.com', # optional
array = False # optional
)
@@ -0,0 +1,19 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.create_enum_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
elements = [],
required = False,
default = '<DEFAULT>', # optional
array = False # optional
)
@@ -0,0 +1,20 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.create_float_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
min = None, # optional
max = None, # optional
default = None, # optional
array = False # optional
)
@@ -0,0 +1,20 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
from appwrite.enums import IndexType
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
tables_db = TablesDb(client)
result = tables_db.create_index(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
type = IndexType.KEY,
columns = [],
orders = [], # optional
lengths = [] # optional
)
@@ -0,0 +1,20 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.create_integer_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
min = None, # optional
max = None, # optional
default = None, # optional
array = False # optional
)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.create_ip_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
default = '', # optional
array = False # optional
)
@@ -0,0 +1,21 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
from appwrite.enums import RelationshipType
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
tables_db = TablesDb(client)
result = tables_db.create_relationship_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
related_table_id = '<RELATED_TABLE_ID>',
type = RelationshipType.ONETOONE,
two_way = False, # optional
key = '', # optional
two_way_key = '', # optional
on_delete = RelationMutate.CASCADE # optional
)
@@ -0,0 +1,17 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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_session('') # The user session to authenticate with
tables_db = TablesDb(client)
result = tables_db.create_row(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
row_id = '<ROW_ID>',
data = {},
permissions = ["read("any")"] # optional
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.create_rows(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
rows = []
)
@@ -0,0 +1,20 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.create_string_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
size = 1,
required = False,
default = '<DEFAULT>', # optional
array = False, # optional
encrypt = False # optional
)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.create_table(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
name = '<NAME>',
permissions = ["read("any")"], # optional
row_security = False, # optional
enabled = False # optional
)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.create_url_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
default = 'https://example.com', # optional
array = False # optional
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.create(
database_id = '<DATABASE_ID>',
name = '<NAME>',
enabled = False # optional
)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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_session('') # The user session to authenticate with
tables_db = TablesDb(client)
result = tables_db.decrement_row_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
row_id = '<ROW_ID>',
column = '',
value = None, # optional
min = None # optional
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.delete_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = ''
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.delete_index(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = ''
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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_session('') # The user session to authenticate with
tables_db = TablesDb(client)
result = tables_db.delete_row(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
row_id = '<ROW_ID>'
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.delete_rows(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
queries = [] # optional
)
@@ -0,0 +1,14 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.delete_table(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>'
)
@@ -0,0 +1,13 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.delete(
database_id = '<DATABASE_ID>'
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.get_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = ''
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.get_index(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = ''
)
@@ -0,0 +1,16 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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_session('') # The user session to authenticate with
tables_db = TablesDb(client)
result = tables_db.get_row(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
row_id = '<ROW_ID>',
queries = [] # optional
)
@@ -0,0 +1,14 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.get_table(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>'
)
@@ -0,0 +1,13 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.get(
database_id = '<DATABASE_ID>'
)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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_session('') # The user session to authenticate with
tables_db = TablesDb(client)
result = tables_db.increment_row_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
row_id = '<ROW_ID>',
column = '',
value = None, # optional
max = None # optional
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.list_columns(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
queries = [] # optional
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.list_indexes(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
queries = [] # optional
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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_session('') # The user session to authenticate with
tables_db = TablesDb(client)
result = tables_db.list_rows(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
queries = [] # optional
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.list_tables(
database_id = '<DATABASE_ID>',
queries = [], # optional
search = '<SEARCH>' # optional
)
@@ -0,0 +1,14 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.list(
queries = [], # optional
search = '<SEARCH>' # optional
)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.update_boolean_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
default = False,
new_key = '' # optional
)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.update_datetime_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
default = '',
new_key = '' # optional
)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.update_email_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
default = 'email@example.com',
new_key = '' # optional
)
@@ -0,0 +1,19 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.update_enum_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
elements = [],
required = False,
default = '<DEFAULT>',
new_key = '' # optional
)
@@ -0,0 +1,20 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.update_float_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
default = None,
min = None, # optional
max = None, # optional
new_key = '' # optional
)
@@ -0,0 +1,20 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.update_integer_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
default = None,
min = None, # optional
max = None, # optional
new_key = '' # optional
)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.update_ip_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
default = '',
new_key = '' # optional
)
@@ -0,0 +1,17 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.update_relationship_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
on_delete = RelationMutate.CASCADE, # optional
new_key = '' # optional
)
@@ -0,0 +1,17 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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_session('') # The user session to authenticate with
tables_db = TablesDb(client)
result = tables_db.update_row(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
row_id = '<ROW_ID>',
data = {}, # optional
permissions = ["read("any")"] # optional
)
@@ -0,0 +1,16 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.update_rows(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
data = {}, # optional
queries = [] # optional
)
@@ -0,0 +1,19 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.update_string_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
default = '<DEFAULT>',
size = 1, # optional
new_key = '' # optional
)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.update_table(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
name = '<NAME>',
permissions = ["read("any")"], # optional
row_security = False, # optional
enabled = False # optional
)
@@ -0,0 +1,18 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.update_url_column(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
key = '',
required = False,
default = 'https://example.com',
new_key = '' # optional
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.update(
database_id = '<DATABASE_ID>',
name = '<NAME>',
enabled = False # optional
)
@@ -0,0 +1,17 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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_session('') # The user session to authenticate with
tables_db = TablesDb(client)
result = tables_db.upsert_row(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
row_id = '<ROW_ID>',
data = {}, # optional
permissions = ["read("any")"] # optional
)
@@ -0,0 +1,15 @@
from appwrite.client import Client
from appwrite.services.tables_db import TablesDb
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
tables_db = TablesDb(client)
result = tables_db.upsert_rows(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
rows = []
)