@@ -13,6 +13,7 @@ def __init__(self, client) -> None:
13
13
def list (self , queries : List [str ] = None , search : str = None ) -> Dict [str , Any ]:
14
14
"""
15
15
Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
16
+
16
17
Parameters
17
18
----------
18
19
queries : List[str]
@@ -45,6 +46,7 @@ def create(self, database_id: str, name: str, enabled: bool = None) -> Dict[str,
45
46
"""
46
47
Create a new Database.
47
48
49
+
48
50
Parameters
49
51
----------
50
52
database_id : str
@@ -85,6 +87,7 @@ def create(self, database_id: str, name: str, enabled: bool = None) -> Dict[str,
85
87
def get (self , database_id : str ) -> Dict [str , Any ]:
86
88
"""
87
89
Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
90
+
88
91
Parameters
89
92
----------
90
93
database_id : str
@@ -116,6 +119,7 @@ def get(self, database_id: str) -> Dict[str, Any]:
116
119
def update (self , database_id : str , name : str , enabled : bool = None ) -> Dict [str , Any ]:
117
120
"""
118
121
Update a database by its unique ID.
122
+
119
123
Parameters
120
124
----------
121
125
database_id : str
@@ -156,6 +160,7 @@ def update(self, database_id: str, name: str, enabled: bool = None) -> Dict[str,
156
160
def delete (self , database_id : str ) -> Dict [str , Any ]:
157
161
"""
158
162
Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
163
+
159
164
Parameters
160
165
----------
161
166
database_id : str
@@ -187,6 +192,7 @@ def delete(self, database_id: str) -> Dict[str, Any]:
187
192
def list_collections (self , database_id : str , queries : List [str ] = None , search : str = None ) -> Dict [str , Any ]:
188
193
"""
189
194
Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
195
+
190
196
Parameters
191
197
----------
192
198
database_id : str
@@ -224,6 +230,7 @@ def list_collections(self, database_id: str, queries: List[str] = None, search:
224
230
def create_collection (self , database_id : str , collection_id : str , name : str , permissions : List [str ] = None , document_security : bool = None , enabled : bool = None ) -> Dict [str , Any ]:
225
231
"""
226
232
Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
233
+
227
234
Parameters
228
235
----------
229
236
database_id : str
@@ -276,6 +283,7 @@ def create_collection(self, database_id: str, collection_id: str, name: str, per
276
283
def get_collection (self , database_id : str , collection_id : str ) -> Dict [str , Any ]:
277
284
"""
278
285
Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
286
+
279
287
Parameters
280
288
----------
281
289
database_id : str
@@ -313,6 +321,7 @@ def get_collection(self, database_id: str, collection_id: str) -> Dict[str, Any]
313
321
def update_collection (self , database_id : str , collection_id : str , name : str , permissions : List [str ] = None , document_security : bool = None , enabled : bool = None ) -> Dict [str , Any ]:
314
322
"""
315
323
Update a collection by its unique ID.
324
+
316
325
Parameters
317
326
----------
318
327
database_id : str
@@ -365,6 +374,7 @@ def update_collection(self, database_id: str, collection_id: str, name: str, per
365
374
def delete_collection (self , database_id : str , collection_id : str ) -> Dict [str , Any ]:
366
375
"""
367
376
Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
377
+
368
378
Parameters
369
379
----------
370
380
database_id : str
@@ -402,6 +412,7 @@ def delete_collection(self, database_id: str, collection_id: str) -> Dict[str, A
402
412
def list_attributes (self , database_id : str , collection_id : str , queries : List [str ] = None ) -> Dict [str , Any ]:
403
413
"""
404
414
List attributes in the collection.
415
+
405
416
Parameters
406
417
----------
407
418
database_id : str
@@ -443,6 +454,7 @@ def create_boolean_attribute(self, database_id: str, collection_id: str, key: st
443
454
"""
444
455
Create a boolean attribute.
445
456
457
+
446
458
Parameters
447
459
----------
448
460
database_id : str
@@ -498,6 +510,7 @@ def create_boolean_attribute(self, database_id: str, collection_id: str, key: st
498
510
def update_boolean_attribute (self , database_id : str , collection_id : str , key : str , required : bool , default : bool , new_key : str = None ) -> Dict [str , Any ]:
499
511
"""
500
512
Update a boolean attribute. Changing the `default` value will not update already existing documents.
513
+
501
514
Parameters
502
515
----------
503
516
database_id : str
@@ -553,6 +566,7 @@ def update_boolean_attribute(self, database_id: str, collection_id: str, key: st
553
566
def create_datetime_attribute (self , database_id : str , collection_id : str , key : str , required : bool , default : str = None , array : bool = None ) -> Dict [str , Any ]:
554
567
"""
555
568
Create a date time attribute according to the ISO 8601 standard.
569
+
556
570
Parameters
557
571
----------
558
572
database_id : str
@@ -608,6 +622,7 @@ def create_datetime_attribute(self, database_id: str, collection_id: str, key: s
608
622
def update_datetime_attribute (self , database_id : str , collection_id : str , key : str , required : bool , default : str , new_key : str = None ) -> Dict [str , Any ]:
609
623
"""
610
624
Update a date time attribute. Changing the `default` value will not update already existing documents.
625
+
611
626
Parameters
612
627
----------
613
628
database_id : str
@@ -664,6 +679,7 @@ def create_email_attribute(self, database_id: str, collection_id: str, key: str,
664
679
"""
665
680
Create an email attribute.
666
681
682
+
667
683
Parameters
668
684
----------
669
685
database_id : str
@@ -720,6 +736,7 @@ def update_email_attribute(self, database_id: str, collection_id: str, key: str,
720
736
"""
721
737
Update an email attribute. Changing the `default` value will not update already existing documents.
722
738
739
+
723
740
Parameters
724
741
----------
725
742
database_id : str
@@ -776,6 +793,7 @@ def create_enum_attribute(self, database_id: str, collection_id: str, key: str,
776
793
"""
777
794
Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute.
778
795
796
+
779
797
Parameters
780
798
----------
781
799
database_id : str
@@ -838,6 +856,7 @@ def update_enum_attribute(self, database_id: str, collection_id: str, key: str,
838
856
"""
839
857
Update an enum attribute. Changing the `default` value will not update already existing documents.
840
858
859
+
841
860
Parameters
842
861
----------
843
862
database_id : str
@@ -900,6 +919,7 @@ def create_float_attribute(self, database_id: str, collection_id: str, key: str,
900
919
"""
901
920
Create a float attribute. Optionally, minimum and maximum values can be provided.
902
921
922
+
903
923
Parameters
904
924
----------
905
925
database_id : str
@@ -962,6 +982,7 @@ def update_float_attribute(self, database_id: str, collection_id: str, key: str,
962
982
"""
963
983
Update a float attribute. Changing the `default` value will not update already existing documents.
964
984
985
+
965
986
Parameters
966
987
----------
967
988
database_id : str
@@ -1024,6 +1045,7 @@ def create_integer_attribute(self, database_id: str, collection_id: str, key: st
1024
1045
"""
1025
1046
Create an integer attribute. Optionally, minimum and maximum values can be provided.
1026
1047
1048
+
1027
1049
Parameters
1028
1050
----------
1029
1051
database_id : str
@@ -1086,6 +1108,7 @@ def update_integer_attribute(self, database_id: str, collection_id: str, key: st
1086
1108
"""
1087
1109
Update an integer attribute. Changing the `default` value will not update already existing documents.
1088
1110
1111
+
1089
1112
Parameters
1090
1113
----------
1091
1114
database_id : str
@@ -1148,6 +1171,7 @@ def create_ip_attribute(self, database_id: str, collection_id: str, key: str, re
1148
1171
"""
1149
1172
Create IP address attribute.
1150
1173
1174
+
1151
1175
Parameters
1152
1176
----------
1153
1177
database_id : str
@@ -1204,6 +1228,7 @@ def update_ip_attribute(self, database_id: str, collection_id: str, key: str, re
1204
1228
"""
1205
1229
Update an ip attribute. Changing the `default` value will not update already existing documents.
1206
1230
1231
+
1207
1232
Parameters
1208
1233
----------
1209
1234
database_id : str
@@ -1260,6 +1285,7 @@ def create_relationship_attribute(self, database_id: str, collection_id: str, re
1260
1285
"""
1261
1286
Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
1262
1287
1288
+
1263
1289
Parameters
1264
1290
----------
1265
1291
database_id : str
@@ -1322,6 +1348,7 @@ def create_string_attribute(self, database_id: str, collection_id: str, key: str
1322
1348
"""
1323
1349
Create a string attribute.
1324
1350
1351
+
1325
1352
Parameters
1326
1353
----------
1327
1354
database_id : str
@@ -1387,6 +1414,7 @@ def update_string_attribute(self, database_id: str, collection_id: str, key: str
1387
1414
"""
1388
1415
Update a string attribute. Changing the `default` value will not update already existing documents.
1389
1416
1417
+
1390
1418
Parameters
1391
1419
----------
1392
1420
database_id : str
@@ -1446,6 +1474,7 @@ def create_url_attribute(self, database_id: str, collection_id: str, key: str, r
1446
1474
"""
1447
1475
Create a URL attribute.
1448
1476
1477
+
1449
1478
Parameters
1450
1479
----------
1451
1480
database_id : str
@@ -1502,6 +1531,7 @@ def update_url_attribute(self, database_id: str, collection_id: str, key: str, r
1502
1531
"""
1503
1532
Update an url attribute. Changing the `default` value will not update already existing documents.
1504
1533
1534
+
1505
1535
Parameters
1506
1536
----------
1507
1537
database_id : str
@@ -1557,6 +1587,7 @@ def update_url_attribute(self, database_id: str, collection_id: str, key: str, r
1557
1587
def get_attribute (self , database_id : str , collection_id : str , key : str ) -> Dict [str , Any ]:
1558
1588
"""
1559
1589
Get attribute by ID.
1590
+
1560
1591
Parameters
1561
1592
----------
1562
1593
database_id : str
@@ -1600,6 +1631,7 @@ def get_attribute(self, database_id: str, collection_id: str, key: str) -> Dict[
1600
1631
def delete_attribute (self , database_id : str , collection_id : str , key : str ) -> Dict [str , Any ]:
1601
1632
"""
1602
1633
Deletes an attribute.
1634
+
1603
1635
Parameters
1604
1636
----------
1605
1637
database_id : str
@@ -1644,6 +1676,7 @@ def update_relationship_attribute(self, database_id: str, collection_id: str, ke
1644
1676
"""
1645
1677
Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
1646
1678
1679
+
1647
1680
Parameters
1648
1681
----------
1649
1682
database_id : str
@@ -1693,6 +1726,7 @@ def update_relationship_attribute(self, database_id: str, collection_id: str, ke
1693
1726
def list_documents (self , database_id : str , collection_id : str , queries : List [str ] = None ) -> Dict [str , Any ]:
1694
1727
"""
1695
1728
Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
1729
+
1696
1730
Parameters
1697
1731
----------
1698
1732
database_id : str
@@ -1734,6 +1768,7 @@ def create_document(self, database_id: str, collection_id: str, document_id: str
1734
1768
"""
1735
1769
Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
1736
1770
1771
+
1737
1772
Parameters
1738
1773
----------
1739
1774
database_id : str
@@ -1786,6 +1821,7 @@ def create_document(self, database_id: str, collection_id: str, document_id: str
1786
1821
def get_document (self , database_id : str , collection_id : str , document_id : str , queries : List [str ] = None ) -> Dict [str , Any ]:
1787
1822
"""
1788
1823
Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
1824
+
1789
1825
Parameters
1790
1826
----------
1791
1827
database_id : str
@@ -1832,6 +1868,7 @@ def get_document(self, database_id: str, collection_id: str, document_id: str, q
1832
1868
def update_document (self , database_id : str , collection_id : str , document_id : str , data : dict = None , permissions : List [str ] = None ) -> Dict [str , Any ]:
1833
1869
"""
1834
1870
Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
1871
+
1835
1872
Parameters
1836
1873
----------
1837
1874
database_id : str
@@ -1881,6 +1918,7 @@ def update_document(self, database_id: str, collection_id: str, document_id: str
1881
1918
def delete_document (self , database_id : str , collection_id : str , document_id : str ) -> Dict [str , Any ]:
1882
1919
"""
1883
1920
Delete a document by its unique ID.
1921
+
1884
1922
Parameters
1885
1923
----------
1886
1924
database_id : str
@@ -1924,6 +1962,7 @@ def delete_document(self, database_id: str, collection_id: str, document_id: str
1924
1962
def list_indexes (self , database_id : str , collection_id : str , queries : List [str ] = None ) -> Dict [str , Any ]:
1925
1963
"""
1926
1964
List indexes in the collection.
1965
+
1927
1966
Parameters
1928
1967
----------
1929
1968
database_id : str
@@ -1965,6 +2004,7 @@ def create_index(self, database_id: str, collection_id: str, key: str, type: Ind
1965
2004
"""
1966
2005
Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
1967
2006
Attributes can be `key`, `fulltext`, and `unique`.
2007
+
1968
2008
Parameters
1969
2009
----------
1970
2010
database_id : str
@@ -2023,6 +2063,7 @@ def create_index(self, database_id: str, collection_id: str, key: str, type: Ind
2023
2063
def get_index (self , database_id : str , collection_id : str , key : str ) -> Dict [str , Any ]:
2024
2064
"""
2025
2065
Get index by ID.
2066
+
2026
2067
Parameters
2027
2068
----------
2028
2069
database_id : str
@@ -2066,6 +2107,7 @@ def get_index(self, database_id: str, collection_id: str, key: str) -> Dict[str,
2066
2107
def delete_index (self , database_id : str , collection_id : str , key : str ) -> Dict [str , Any ]:
2067
2108
"""
2068
2109
Delete an index.
2110
+
2069
2111
Parameters
2070
2112
----------
2071
2113
database_id : str
0 commit comments