arcade-google-sheets 3.1.0__py3-none-any.whl → 3.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,7 +53,9 @@ async def search_spreadsheets(
53
53
  ] = False,
54
54
  order_by: Annotated[
55
55
  list[OrderBy] | None,
56
- "Sort order. Defaults to listing the most recently modified spreadsheets first",
56
+ "Sort order. Defaults to listing the most recently modified spreadsheets first. "
57
+ "If spreadsheet_contains or spreadsheet_not_contains is provided, "
58
+ "then the order_by will be ignored.",
57
59
  ] = None,
58
60
  limit: Annotated[
59
61
  int, "The maximum number of spreadsheets to list. Defaults to 10. Max is 50"
@@ -73,6 +75,11 @@ async def search_spreadsheets(
73
75
  Does not return the content/data of the sheets in the spreadsheets - only the metadata.
74
76
  Excludes spreadsheets that are in the trash.
75
77
  """
78
+ if spreadsheet_contains or spreadsheet_not_contains:
79
+ # Google drive API does not support other order_by values for
80
+ # queries with fullText search (which is used when spreadsheet_contains
81
+ # or spreadsheet_not_contains is provided).
82
+ order_by = None
76
83
  if order_by is None:
77
84
  order_by = [OrderBy.MODIFIED_TIME_DESC]
78
85
  elif isinstance(order_by, OrderBy):
@@ -971,8 +971,8 @@ def build_files_list_query(
971
971
  name_not_contains = keyword.replace("'", "\\'")
972
972
  full_text_not_contains = keyword.replace("'", "\\'")
973
973
  keyword_query = (
974
- f"(name not contains '{name_not_contains}' and "
975
- f"fullText not contains '{full_text_not_contains}')"
974
+ f"(not (name contains '{name_not_contains}' or "
975
+ f"fullText contains '{full_text_not_contains}'))"
976
976
  )
977
977
  query.append(keyword_query)
978
978
 
@@ -982,7 +982,7 @@ def build_files_list_query(
982
982
  def build_files_list_params(
983
983
  mime_type: str,
984
984
  page_size: int,
985
- order_by: list[OrderBy],
985
+ order_by: list[OrderBy] | None,
986
986
  pagination_token: str | None,
987
987
  include_shared_drives: bool,
988
988
  search_only_in_shared_drive_id: str | None,
@@ -999,7 +999,7 @@ def build_files_list_params(
999
999
  params = {
1000
1000
  "q": query,
1001
1001
  "pageSize": page_size,
1002
- "orderBy": ",".join([item.value for item in order_by]),
1002
+ "orderBy": ",".join([item.value for item in order_by]) if order_by else None,
1003
1003
  "pageToken": pagination_token,
1004
1004
  }
1005
1005
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arcade_google_sheets
3
- Version: 3.1.0
3
+ Version: 3.1.1
4
4
  Summary: Arcade.dev LLM tools for Google Sheets
5
5
  Author-email: Arcade <dev@arcade.dev>
6
6
  License: Proprietary - Arcade Software License Agreement v1.0
@@ -7,12 +7,12 @@ arcade_google_sheets/file_picker.py,sha256=kGfUVfH5QVlIW1sL-_gAwPokt7TwVEcPk3Vnk
7
7
  arcade_google_sheets/models.py,sha256=xwPdwUis0OHTDbSLy85qWl7zIh2lDTi5HZMNKwdZjzo,8627
8
8
  arcade_google_sheets/templates.py,sha256=p3ty6Kwo7l73EEsZTaRfdG4jzQ9XvlqqeXMLKB1ydEw,489
9
9
  arcade_google_sheets/types.py,sha256=R-rCRcyFqDZx3jgl_kWeCliqC8fHuZ8ub_LQ2KoU2AE,37
10
- arcade_google_sheets/utils.py,sha256=GHCGQYA8W8eR-78KcVgflz_D98OKMgjulYFuoR9iJAo,34869
10
+ arcade_google_sheets/utils.py,sha256=VmDZOzAOEtfSPOra-ieVl_U16RLonQUOnZ4RW4Gf-oA,34895
11
11
  arcade_google_sheets/tools/__init__.py,sha256=IiSd-0Q4_uxeKI8nVMT3JVRoF5G5GB8e5Z9SkGpSnt8,472
12
12
  arcade_google_sheets/tools/read.py,sha256=g7uGhyhFNlDPHKT3xhg7NdMaSYuvzzefSzrb1XqiI80,4309
13
- arcade_google_sheets/tools/search.py,sha256=q6sI4qUcg0dGiLrTQa6AbpRvsljW9LbL8gCa96ZD-aQ,4975
13
+ arcade_google_sheets/tools/search.py,sha256=EnO739RmBryDerYnzV7eD_drchNNVqS50DgdySYh9Ac,5381
14
14
  arcade_google_sheets/tools/write.py,sha256=4kNx941PQt6VUGTogbepnbfUdcsVze6u5c8QvlNnWCI,7782
15
- arcade_google_sheets-3.1.0.dist-info/METADATA,sha256=FcyWZ3Wvr2wuFU4L7w8zlrTWl9iPvGN0AkkkqS6HGqQ,1123
16
- arcade_google_sheets-3.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
17
- arcade_google_sheets-3.1.0.dist-info/licenses/LICENSE,sha256=ixeE7aL9b2B-_ZYHTY1vQcJB4NufKeo-LWwKNObGDN0,1960
18
- arcade_google_sheets-3.1.0.dist-info/RECORD,,
15
+ arcade_google_sheets-3.1.1.dist-info/METADATA,sha256=M6BDKH6yb3xVzPC9ByD0BjJePVy0D5g5x7IxyiouuZ8,1123
16
+ arcade_google_sheets-3.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
17
+ arcade_google_sheets-3.1.1.dist-info/licenses/LICENSE,sha256=ixeE7aL9b2B-_ZYHTY1vQcJB4NufKeo-LWwKNObGDN0,1960
18
+ arcade_google_sheets-3.1.1.dist-info/RECORD,,