Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions appwrite/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ def __init__(self):
self._endpoint = 'https://cloud.appwrite.io/v1'
self._global_headers = {
'content-type': '',
'user-agent' : f'AppwritePythonSDK/13.0.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
'user-agent' : f'AppwritePythonSDK/13.1.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
'x-sdk-name': 'Python',
'x-sdk-platform': 'server',
'x-sdk-language': 'python',
'x-sdk-version': '13.0.0',
'x-sdk-version': '13.1.0',
'X-Appwrite-Response-Format' : '1.8.0',
}

Expand Down
4 changes: 4 additions & 0 deletions appwrite/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ def order_asc(attribute):
def order_desc(attribute):
return str(Query("orderDesc", attribute, None))

@staticmethod
def order_random():
return str(Query("orderRandom", None, None))

@staticmethod
def cursor_before(id):
return str(Query("cursorBefore", None, id))
Expand Down
2 changes: 1 addition & 1 deletion appwrite/services/tables_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -2337,7 +2337,7 @@ def create_rows(self, database_id: str, table_id: str, rows: List[dict]) -> Dict
table_id : str
Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). Make sure to define columns before creating rows.
rows : List[dict]
Array of documents data as JSON objects.
Array of rows data as JSON objects.
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ result = databases.create_line_attribute(
collection_id = '<COLLECTION_ID>',
key = '',
required = False,
default = [[1,2], [3, 4]] # optional
default = [[1, 2], [3, 4], [5, 6]] # optional
)
2 changes: 1 addition & 1 deletion docs/examples/databases/create-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ result = databases.create_point_attribute(
collection_id = '<COLLECTION_ID>',
key = '',
required = False,
default = [[1,2], [3, 4]] # optional
default = [1, 2] # optional
)
2 changes: 1 addition & 1 deletion docs/examples/databases/create-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ result = databases.create_polygon_attribute(
collection_id = '<COLLECTION_ID>',
key = '',
required = False,
default = [[1,2], [3, 4]] # optional
default = [[[1, 2], [3, 4], [5, 6], [1, 2]]] # optional
)
2 changes: 1 addition & 1 deletion docs/examples/databases/update-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ result = databases.update_line_attribute(
collection_id = '<COLLECTION_ID>',
key = '',
required = False,
default = [[1,2], [3, 4]], # optional
default = [[1, 2], [3, 4], [5, 6]], # optional
new_key = '' # optional
)
2 changes: 1 addition & 1 deletion docs/examples/databases/update-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ result = databases.update_point_attribute(
collection_id = '<COLLECTION_ID>',
key = '',
required = False,
default = [[1,2], [3, 4]], # optional
default = [1, 2], # optional
new_key = '' # optional
)
2 changes: 1 addition & 1 deletion docs/examples/databases/update-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ result = databases.update_polygon_attribute(
collection_id = '<COLLECTION_ID>',
key = '',
required = False,
default = [[1,2], [3, 4]], # optional
default = [[[1, 2], [3, 4], [5, 6], [1, 2]]], # optional
new_key = '' # optional
)
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-line-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ result = tables_db.create_line_column(
table_id = '<TABLE_ID>',
key = '',
required = False,
default = [[1,2], [3, 4]] # optional
default = [[1, 2], [3, 4], [5, 6]] # optional
)
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-point-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ result = tables_db.create_point_column(
table_id = '<TABLE_ID>',
key = '',
required = False,
default = [[1,2], [3, 4]] # optional
default = [1, 2] # optional
)
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-polygon-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ result = tables_db.create_polygon_column(
table_id = '<TABLE_ID>',
key = '',
required = False,
default = [[1,2], [3, 4]] # optional
default = [[[1, 2], [3, 4], [5, 6], [1, 2]]] # optional
)
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/update-line-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ result = tables_db.update_line_column(
table_id = '<TABLE_ID>',
key = '',
required = False,
default = [[1,2], [3, 4]], # optional
default = [[1, 2], [3, 4], [5, 6]], # optional
new_key = '' # optional
)
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/update-point-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ result = tables_db.update_point_column(
table_id = '<TABLE_ID>',
key = '',
required = False,
default = [[1,2], [3, 4]], # optional
default = [1, 2], # optional
new_key = '' # optional
)
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/update-polygon-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ result = tables_db.update_polygon_column(
table_id = '<TABLE_ID>',
key = '',
required = False,
default = [[1,2], [3, 4]], # optional
default = [[[1, 2], [3, 4], [5, 6], [1, 2]]], # optional
new_key = '' # optional
)
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'appwrite/encoders',
'appwrite/enums',
],
version = '13.0.0',
version = '13.1.0',
license='BSD-3-Clause',
description = 'Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API',
long_description = long_description,
Expand All @@ -23,7 +23,7 @@
maintainer = 'Appwrite Team',
maintainer_email = 'team@appwrite.io',
url = 'https://appwrite.io/support',
download_url='https://github.com/appwrite/sdk-for-python/archive/13.0.0.tar.gz',
download_url='https://github.com/appwrite/sdk-for-python/archive/13.1.0.tar.gz',
install_requires=[
'requests',
],
Expand Down