mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
examples and changelog
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
from appwrite.client import Client
|
||||
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
|
||||
|
||||
databases = Databases(client)
|
||||
|
||||
result = databases.create_longtext_attribute(
|
||||
database_id = '<DATABASE_ID>',
|
||||
collection_id = '<COLLECTION_ID>',
|
||||
key = '',
|
||||
required = False,
|
||||
default = '<DEFAULT>', # optional
|
||||
array = False # optional
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
from appwrite.client import Client
|
||||
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
|
||||
|
||||
databases = Databases(client)
|
||||
|
||||
result = databases.create_mediumtext_attribute(
|
||||
database_id = '<DATABASE_ID>',
|
||||
collection_id = '<COLLECTION_ID>',
|
||||
key = '',
|
||||
required = False,
|
||||
default = '<DEFAULT>', # optional
|
||||
array = False # optional
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
from appwrite.client import Client
|
||||
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
|
||||
|
||||
databases = Databases(client)
|
||||
|
||||
result = databases.create_text_attribute(
|
||||
database_id = '<DATABASE_ID>',
|
||||
collection_id = '<COLLECTION_ID>',
|
||||
key = '',
|
||||
required = False,
|
||||
default = '<DEFAULT>', # optional
|
||||
array = False # optional
|
||||
)
|
||||
@@ -0,0 +1,19 @@
|
||||
from appwrite.client import Client
|
||||
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
|
||||
|
||||
databases = Databases(client)
|
||||
|
||||
result = databases.create_varchar_attribute(
|
||||
database_id = '<DATABASE_ID>',
|
||||
collection_id = '<COLLECTION_ID>',
|
||||
key = '',
|
||||
size = 1,
|
||||
required = False,
|
||||
default = '<DEFAULT>', # optional
|
||||
array = False # optional
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
from appwrite.client import Client
|
||||
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
|
||||
|
||||
databases = Databases(client)
|
||||
|
||||
result = databases.update_longtext_attribute(
|
||||
database_id = '<DATABASE_ID>',
|
||||
collection_id = '<COLLECTION_ID>',
|
||||
key = '',
|
||||
required = False,
|
||||
default = '<DEFAULT>',
|
||||
new_key = '' # optional
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
from appwrite.client import Client
|
||||
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
|
||||
|
||||
databases = Databases(client)
|
||||
|
||||
result = databases.update_mediumtext_attribute(
|
||||
database_id = '<DATABASE_ID>',
|
||||
collection_id = '<COLLECTION_ID>',
|
||||
key = '',
|
||||
required = False,
|
||||
default = '<DEFAULT>',
|
||||
new_key = '' # optional
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
from appwrite.client import Client
|
||||
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
|
||||
|
||||
databases = Databases(client)
|
||||
|
||||
result = databases.update_text_attribute(
|
||||
database_id = '<DATABASE_ID>',
|
||||
collection_id = '<COLLECTION_ID>',
|
||||
key = '',
|
||||
required = False,
|
||||
default = '<DEFAULT>',
|
||||
new_key = '' # optional
|
||||
)
|
||||
@@ -0,0 +1,19 @@
|
||||
from appwrite.client import Client
|
||||
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
|
||||
|
||||
databases = Databases(client)
|
||||
|
||||
result = databases.update_varchar_attribute(
|
||||
database_id = '<DATABASE_ID>',
|
||||
collection_id = '<COLLECTION_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.create_longtext_column(
|
||||
database_id = '<DATABASE_ID>',
|
||||
table_id = '<TABLE_ID>',
|
||||
key = '',
|
||||
required = False,
|
||||
default = '<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_mediumtext_column(
|
||||
database_id = '<DATABASE_ID>',
|
||||
table_id = '<TABLE_ID>',
|
||||
key = '',
|
||||
required = False,
|
||||
default = '<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_text_column(
|
||||
database_id = '<DATABASE_ID>',
|
||||
table_id = '<TABLE_ID>',
|
||||
key = '',
|
||||
required = False,
|
||||
default = '<DEFAULT>', # 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_varchar_column(
|
||||
database_id = '<DATABASE_ID>',
|
||||
table_id = '<TABLE_ID>',
|
||||
key = '',
|
||||
size = 1,
|
||||
required = False,
|
||||
default = '<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.update_longtext_column(
|
||||
database_id = '<DATABASE_ID>',
|
||||
table_id = '<TABLE_ID>',
|
||||
key = '',
|
||||
required = False,
|
||||
default = '<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_mediumtext_column(
|
||||
database_id = '<DATABASE_ID>',
|
||||
table_id = '<TABLE_ID>',
|
||||
key = '',
|
||||
required = False,
|
||||
default = '<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_text_column(
|
||||
database_id = '<DATABASE_ID>',
|
||||
table_id = '<TABLE_ID>',
|
||||
key = '',
|
||||
required = False,
|
||||
default = '<DEFAULT>',
|
||||
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_varchar_column(
|
||||
database_id = '<DATABASE_ID>',
|
||||
table_id = '<TABLE_ID>',
|
||||
key = '',
|
||||
required = False,
|
||||
default = '<DEFAULT>',
|
||||
size = 1, # optional
|
||||
new_key = '' # optional
|
||||
)
|
||||
Reference in New Issue
Block a user