athena-intelligence 0.1.200__py3-none-any.whl → 0.1.202__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.
@@ -22,10 +22,10 @@ class BaseClientWrapper:
22
22
 
23
23
  def get_headers(self) -> typing.Dict[str, str]:
24
24
  headers: typing.Dict[str, str] = {
25
- "User-Agent": "athena-intelligence/0.1.200",
25
+ "User-Agent": "athena-intelligence/0.1.202",
26
26
  "X-Fern-Language": "Python",
27
27
  "X-Fern-SDK-Name": "athena-intelligence",
28
- "X-Fern-SDK-Version": "0.1.200",
28
+ "X-Fern-SDK-Version": "0.1.202",
29
29
  **(self.get_custom_headers() or {}),
30
30
  }
31
31
  headers["X-API-KEY"] = self.api_key
@@ -527,6 +527,61 @@ class SheetsClient:
527
527
  )
528
528
  return _response.data
529
529
 
530
+ def insert_row(
531
+ self,
532
+ *,
533
+ asset_id: str,
534
+ reference_row_index: int,
535
+ num_rows: typing.Optional[int] = OMIT,
536
+ sheet_id: typing.Optional[int] = OMIT,
537
+ request_options: typing.Optional[RequestOptions] = None,
538
+ ) -> SheetOperationResponse:
539
+ """
540
+ Insert a row in an Athena spreadsheet.
541
+
542
+ Parameters
543
+ ----------
544
+ asset_id : str
545
+ The ID of the spreadsheet asset
546
+
547
+ reference_row_index : int
548
+ 1-based reference row index where to insert
549
+
550
+ num_rows : typing.Optional[int]
551
+ Number of rows to insert
552
+
553
+ sheet_id : typing.Optional[int]
554
+ Sheet ID (defaults to 1)
555
+
556
+ request_options : typing.Optional[RequestOptions]
557
+ Request-specific configuration.
558
+
559
+ Returns
560
+ -------
561
+ SheetOperationResponse
562
+ Successful Response
563
+
564
+ Examples
565
+ --------
566
+ from athena import Athena
567
+
568
+ client = Athena(
569
+ api_key="YOUR_API_KEY",
570
+ )
571
+ client.tools.sheets.insert_row(
572
+ asset_id="asset_id",
573
+ reference_row_index=1,
574
+ )
575
+ """
576
+ _response = self._raw_client.insert_row(
577
+ asset_id=asset_id,
578
+ reference_row_index=reference_row_index,
579
+ num_rows=num_rows,
580
+ sheet_id=sheet_id,
581
+ request_options=request_options,
582
+ )
583
+ return _response.data
584
+
530
585
  def duplicate_sheet(
531
586
  self,
532
587
  *,
@@ -1488,6 +1543,69 @@ class AsyncSheetsClient:
1488
1543
  )
1489
1544
  return _response.data
1490
1545
 
1546
+ async def insert_row(
1547
+ self,
1548
+ *,
1549
+ asset_id: str,
1550
+ reference_row_index: int,
1551
+ num_rows: typing.Optional[int] = OMIT,
1552
+ sheet_id: typing.Optional[int] = OMIT,
1553
+ request_options: typing.Optional[RequestOptions] = None,
1554
+ ) -> SheetOperationResponse:
1555
+ """
1556
+ Insert a row in an Athena spreadsheet.
1557
+
1558
+ Parameters
1559
+ ----------
1560
+ asset_id : str
1561
+ The ID of the spreadsheet asset
1562
+
1563
+ reference_row_index : int
1564
+ 1-based reference row index where to insert
1565
+
1566
+ num_rows : typing.Optional[int]
1567
+ Number of rows to insert
1568
+
1569
+ sheet_id : typing.Optional[int]
1570
+ Sheet ID (defaults to 1)
1571
+
1572
+ request_options : typing.Optional[RequestOptions]
1573
+ Request-specific configuration.
1574
+
1575
+ Returns
1576
+ -------
1577
+ SheetOperationResponse
1578
+ Successful Response
1579
+
1580
+ Examples
1581
+ --------
1582
+ import asyncio
1583
+
1584
+ from athena import AsyncAthena
1585
+
1586
+ client = AsyncAthena(
1587
+ api_key="YOUR_API_KEY",
1588
+ )
1589
+
1590
+
1591
+ async def main() -> None:
1592
+ await client.tools.sheets.insert_row(
1593
+ asset_id="asset_id",
1594
+ reference_row_index=1,
1595
+ )
1596
+
1597
+
1598
+ asyncio.run(main())
1599
+ """
1600
+ _response = await self._raw_client.insert_row(
1601
+ asset_id=asset_id,
1602
+ reference_row_index=reference_row_index,
1603
+ num_rows=num_rows,
1604
+ sheet_id=sheet_id,
1605
+ request_options=request_options,
1606
+ )
1607
+ return _response.data
1608
+
1491
1609
  async def duplicate_sheet(
1492
1610
  self,
1493
1611
  *,
@@ -670,6 +670,81 @@ class RawSheetsClient:
670
670
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
671
671
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
672
672
 
673
+ def insert_row(
674
+ self,
675
+ *,
676
+ asset_id: str,
677
+ reference_row_index: int,
678
+ num_rows: typing.Optional[int] = OMIT,
679
+ sheet_id: typing.Optional[int] = OMIT,
680
+ request_options: typing.Optional[RequestOptions] = None,
681
+ ) -> HttpResponse[SheetOperationResponse]:
682
+ """
683
+ Insert a row in an Athena spreadsheet.
684
+
685
+ Parameters
686
+ ----------
687
+ asset_id : str
688
+ The ID of the spreadsheet asset
689
+
690
+ reference_row_index : int
691
+ 1-based reference row index where to insert
692
+
693
+ num_rows : typing.Optional[int]
694
+ Number of rows to insert
695
+
696
+ sheet_id : typing.Optional[int]
697
+ Sheet ID (defaults to 1)
698
+
699
+ request_options : typing.Optional[RequestOptions]
700
+ Request-specific configuration.
701
+
702
+ Returns
703
+ -------
704
+ HttpResponse[SheetOperationResponse]
705
+ Successful Response
706
+ """
707
+ _response = self._client_wrapper.httpx_client.request(
708
+ "api/v0/tools/sheets/row/insert",
709
+ method="POST",
710
+ json={
711
+ "asset_id": asset_id,
712
+ "num_rows": num_rows,
713
+ "reference_row_index": reference_row_index,
714
+ "sheet_id": sheet_id,
715
+ },
716
+ headers={
717
+ "content-type": "application/json",
718
+ },
719
+ request_options=request_options,
720
+ omit=OMIT,
721
+ )
722
+ try:
723
+ if 200 <= _response.status_code < 300:
724
+ _data = typing.cast(
725
+ SheetOperationResponse,
726
+ parse_obj_as(
727
+ type_=SheetOperationResponse, # type: ignore
728
+ object_=_response.json(),
729
+ ),
730
+ )
731
+ return HttpResponse(response=_response, data=_data)
732
+ if _response.status_code == 422:
733
+ raise UnprocessableEntityError(
734
+ headers=dict(_response.headers),
735
+ body=typing.cast(
736
+ typing.Optional[typing.Any],
737
+ parse_obj_as(
738
+ type_=typing.Optional[typing.Any], # type: ignore
739
+ object_=_response.json(),
740
+ ),
741
+ ),
742
+ )
743
+ _response_json = _response.json()
744
+ except JSONDecodeError:
745
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
746
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
747
+
673
748
  def duplicate_sheet(
674
749
  self,
675
750
  *,
@@ -1815,6 +1890,81 @@ class AsyncRawSheetsClient:
1815
1890
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1816
1891
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1817
1892
 
1893
+ async def insert_row(
1894
+ self,
1895
+ *,
1896
+ asset_id: str,
1897
+ reference_row_index: int,
1898
+ num_rows: typing.Optional[int] = OMIT,
1899
+ sheet_id: typing.Optional[int] = OMIT,
1900
+ request_options: typing.Optional[RequestOptions] = None,
1901
+ ) -> AsyncHttpResponse[SheetOperationResponse]:
1902
+ """
1903
+ Insert a row in an Athena spreadsheet.
1904
+
1905
+ Parameters
1906
+ ----------
1907
+ asset_id : str
1908
+ The ID of the spreadsheet asset
1909
+
1910
+ reference_row_index : int
1911
+ 1-based reference row index where to insert
1912
+
1913
+ num_rows : typing.Optional[int]
1914
+ Number of rows to insert
1915
+
1916
+ sheet_id : typing.Optional[int]
1917
+ Sheet ID (defaults to 1)
1918
+
1919
+ request_options : typing.Optional[RequestOptions]
1920
+ Request-specific configuration.
1921
+
1922
+ Returns
1923
+ -------
1924
+ AsyncHttpResponse[SheetOperationResponse]
1925
+ Successful Response
1926
+ """
1927
+ _response = await self._client_wrapper.httpx_client.request(
1928
+ "api/v0/tools/sheets/row/insert",
1929
+ method="POST",
1930
+ json={
1931
+ "asset_id": asset_id,
1932
+ "num_rows": num_rows,
1933
+ "reference_row_index": reference_row_index,
1934
+ "sheet_id": sheet_id,
1935
+ },
1936
+ headers={
1937
+ "content-type": "application/json",
1938
+ },
1939
+ request_options=request_options,
1940
+ omit=OMIT,
1941
+ )
1942
+ try:
1943
+ if 200 <= _response.status_code < 300:
1944
+ _data = typing.cast(
1945
+ SheetOperationResponse,
1946
+ parse_obj_as(
1947
+ type_=SheetOperationResponse, # type: ignore
1948
+ object_=_response.json(),
1949
+ ),
1950
+ )
1951
+ return AsyncHttpResponse(response=_response, data=_data)
1952
+ if _response.status_code == 422:
1953
+ raise UnprocessableEntityError(
1954
+ headers=dict(_response.headers),
1955
+ body=typing.cast(
1956
+ typing.Optional[typing.Any],
1957
+ parse_obj_as(
1958
+ type_=typing.Optional[typing.Any], # type: ignore
1959
+ object_=_response.json(),
1960
+ ),
1961
+ ),
1962
+ )
1963
+ _response_json = _response.json()
1964
+ except JSONDecodeError:
1965
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1966
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1967
+
1818
1968
  async def duplicate_sheet(
1819
1969
  self,
1820
1970
  *,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: athena-intelligence
3
- Version: 0.1.200
3
+ Version: 0.1.202
4
4
  Summary: Athena Intelligence Python Library
5
5
  Requires-Python: >=3.9,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -21,7 +21,7 @@ athena/base_client.py,sha256=dWl0sEjfhGQ_Jj_wq0ypDrGnOoi1s5YwCXinP6Qnyjk,6336
21
21
  athena/client.py,sha256=lK3vVU3TF3YjPpiohpxcuRl8x_sSw8HmQ-uuDDeAT6I,22161
22
22
  athena/core/__init__.py,sha256=lTcqUPXcx4112yLDd70RAPeqq6tu3eFMe1pKOqkW9JQ,1562
23
23
  athena/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
24
- athena/core/client_wrapper.py,sha256=6Bpc32wQStAHU8BN-ftuL0fQADWhgMsLGMlyGA6v42w,2392
24
+ athena/core/client_wrapper.py,sha256=SlHIUqPWwBdggDUEFehVAu6se1IPHTkSMe-G6CZRhVc,2392
25
25
  athena/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
26
26
  athena/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
27
27
  athena/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
@@ -58,8 +58,8 @@ athena/tools/email/client.py,sha256=dOidOOOLHdfz2c3nykzyOa7nTftS91d2_aws0LTg8DU,
58
58
  athena/tools/email/raw_client.py,sha256=GkSxb-RFdhGgFNghnwH6i0cPI_gfWGLUmWvBNlBlhE4,9962
59
59
  athena/tools/raw_client.py,sha256=gUwmZV08uBGmTTNoWFuYGPMnFxPEhswKPDEbLIcVHPo,53027
60
60
  athena/tools/sheets/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
61
- athena/tools/sheets/client.py,sha256=5X-ziwAmbX5IpW2tH01oGdpY9ty83AlziVn9IBa3mAA,49632
62
- athena/tools/sheets/raw_client.py,sha256=zodZ4HEYMJMAck8N-CN50yuVDin1KyGmUFTrHvmMQ4s,79651
61
+ athena/tools/sheets/client.py,sha256=FeZDM-grtK34oiH0_60fggD1bo9ddojDwr1n58vBnHA,52680
62
+ athena/tools/sheets/raw_client.py,sha256=l2P7Iv-V_AEMLkXnzrOvkwZYQRyY6VGkjNicW3S5ST4,84972
63
63
  athena/tools/structured_data_extractor/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
64
64
  athena/tools/structured_data_extractor/client.py,sha256=V1FcGZTPbrlz2d9oQZhsj3UIN1ZlZfnqRdDXj16xiPs,10623
65
65
  athena/tools/structured_data_extractor/raw_client.py,sha256=1ZYZBssmf1jDomopeJ3PMRLql3zT4c7ssRNNLa1YrGE,11245
@@ -112,6 +112,6 @@ athena/types/structured_data_extractor_response.py,sha256=yFQ0CiFDdlZIq2X8UprEAw
112
112
  athena/types/text_content.py,sha256=tcVCPj3tHh5zQcTElr2tdCIjjfx3ZI63rKIlaG8vo64,592
113
113
  athena/types/type.py,sha256=Gvs56nvBMPcQpOZkfPocGNNb7S05PuINianbT309QAQ,146
114
114
  athena/version.py,sha256=tnXYUugs9zF_pkVdem-QBorKSuhEOOuetkR57dADDxE,86
115
- athena_intelligence-0.1.200.dist-info/METADATA,sha256=krBWdqEuFEoI8ibzKgzWagP1mGx-pbOZjZhxXh7Moqk,5440
116
- athena_intelligence-0.1.200.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
117
- athena_intelligence-0.1.200.dist-info/RECORD,,
115
+ athena_intelligence-0.1.202.dist-info/METADATA,sha256=IGQbQdAlTge-fog01SloSBkJRd6zshGxowApC9ypG8A,5440
116
+ athena_intelligence-0.1.202.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
117
+ athena_intelligence-0.1.202.dist-info/RECORD,,