exa-py 1.2.1__py3-none-any.whl → 1.3.0b0__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.

Potentially problematic release.


This version of exa-py might be problematic. Click here for more details.

exa_py/api.py CHANGED
@@ -146,6 +146,11 @@ CONTENTS_OPTIONS_TYPES = {
146
146
  "filter_empty_results": [bool],
147
147
  }
148
148
 
149
+ CONTENTS_ENDPOINT_OPTIONS_TYPES = {
150
+ "subpages": [int],
151
+ "subpage_target": [str, list]
152
+ }
153
+
149
154
  # FOR BETA OPTIONS
150
155
  # if is_beta:
151
156
 
@@ -466,7 +471,7 @@ class Exa:
466
471
  self,
467
472
  api_key: Optional[str],
468
473
  base_url: str = "https://api.exa.ai",
469
- user_agent: str = "exa-py 1.2.1",
474
+ user_agent: str = "exa-py 1.3.0-beta",
470
475
  ):
471
476
  """Initialize the Exa client with the provided API key and optional base URL and user agent.
472
477
 
@@ -764,6 +769,8 @@ class Exa:
764
769
  livecrawl_timeout: Optional[int] = None,
765
770
  livecrawl: Optional[LIVECRAWL_OPTIONS] = None,
766
771
  filter_empty_results: Optional[bool] = None,
772
+ subpages: Optional[int] = None,
773
+ subpage_target: Optional[Union[str, List[str]]] = None
767
774
  ) -> SearchResponse[ResultWithText]:
768
775
  ...
769
776
 
@@ -776,6 +783,8 @@ class Exa:
776
783
  livecrawl_timeout: Optional[int] = None,
777
784
  livecrawl: Optional[LIVECRAWL_OPTIONS] = None,
778
785
  filter_empty_results: Optional[bool] = None,
786
+ subpages: Optional[int] = None,
787
+ subpage_target: Optional[Union[str, List[str]]] = None
779
788
  ) -> SearchResponse[ResultWithText]:
780
789
  ...
781
790
 
@@ -788,6 +797,8 @@ class Exa:
788
797
  livecrawl_timeout: Optional[int] = None,
789
798
  livecrawl: Optional[LIVECRAWL_OPTIONS] = None,
790
799
  filter_empty_results: Optional[bool] = None,
800
+ subpages: Optional[int] = None,
801
+ subpage_target: Optional[Union[str, List[str]]] = None
791
802
  ) -> SearchResponse[ResultWithHighlights]:
792
803
  ...
793
804
 
@@ -801,6 +812,8 @@ class Exa:
801
812
  livecrawl_timeout: Optional[int] = None,
802
813
  livecrawl: Optional[LIVECRAWL_OPTIONS] = None,
803
814
  filter_empty_results: Optional[bool] = None,
815
+ subpages: Optional[int] = None,
816
+ subpage_target: Optional[Union[str, List[str]]] = None
804
817
  ) -> SearchResponse[ResultWithTextAndHighlights]:
805
818
  ...
806
819
 
@@ -813,6 +826,8 @@ class Exa:
813
826
  livecrawl_timeout: Optional[int] = None,
814
827
  livecrawl: Optional[LIVECRAWL_OPTIONS] = None,
815
828
  filter_empty_results: Optional[bool] = None,
829
+ subpages: Optional[int] = None,
830
+ subpage_target: Optional[Union[str, List[str]]] = None
816
831
  ) -> SearchResponse[ResultWithSummary]:
817
832
  ...
818
833
 
@@ -826,6 +841,8 @@ class Exa:
826
841
  livecrawl_timeout: Optional[int] = None,
827
842
  livecrawl: Optional[LIVECRAWL_OPTIONS] = None,
828
843
  filter_empty_results: Optional[bool] = None,
844
+ subpages: Optional[int] = None,
845
+ subpage_target: Optional[Union[str, List[str]]] = None
829
846
  ) -> SearchResponse[ResultWithTextAndSummary]:
830
847
  ...
831
848
 
@@ -839,6 +856,8 @@ class Exa:
839
856
  livecrawl_timeout: Optional[int] = None,
840
857
  livecrawl: Optional[LIVECRAWL_OPTIONS] = None,
841
858
  filter_empty_results: Optional[bool] = None,
859
+ subpages: Optional[int] = None,
860
+ subpage_target: Optional[Union[str, List[str]]] = None
842
861
  ) -> SearchResponse[ResultWithHighlightsAndSummary]:
843
862
  ...
844
863
 
@@ -853,6 +872,8 @@ class Exa:
853
872
  livecrawl_timeout: Optional[int] = None,
854
873
  livecrawl: Optional[LIVECRAWL_OPTIONS] = None,
855
874
  filter_empty_results: Optional[bool] = None,
875
+ subpages: Optional[int] = None,
876
+ subpage_target: Optional[Union[str, List[str]]] = None
856
877
  ) -> SearchResponse[ResultWithTextAndHighlightsAndSummary]:
857
878
  ...
858
879
 
@@ -864,7 +885,7 @@ class Exa:
864
885
  }
865
886
  if "text" not in options and "highlights" not in options and "summary" not in options:
866
887
  options["text"] = True
867
- validate_search_options(options, {**CONTENTS_OPTIONS_TYPES})
888
+ validate_search_options(options, {**CONTENTS_OPTIONS_TYPES, **CONTENTS_ENDPOINT_OPTIONS_TYPES})
868
889
  options = to_camel_case(options)
869
890
  data = self.request("/contents", options)
870
891
  return SearchResponse(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: exa_py
3
- Version: 1.2.1
3
+ Version: 1.3.0b0
4
4
  Summary: Python SDK for Exa API.
5
5
  Home-page: https://github.com/exa-labs/exa-py
6
6
  Author: Exa
@@ -0,0 +1,8 @@
1
+ exa_py/__init__.py,sha256=1selemczpRm1y8V9cWNm90LARnU1jbtyp-Qpx3c7cTw,28
2
+ exa_py/api.py,sha256=L2z0xbAH6AO2A3Y1X0TP4P-RS5i6WsMTTjZ0-jLRO2U,47322
3
+ exa_py/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ exa_py/utils.py,sha256=Rc1FJjoR9LQ7L_OJM91Sd1GNkbHjcLyEvJENhRix6gc,2405
5
+ exa_py-1.3.0b0.dist-info/METADATA,sha256=s4-wKpQqy8CymQyWMB_qGVA7FKUwVobSLH9tJIBcV-k,3032
6
+ exa_py-1.3.0b0.dist-info/WHEEL,sha256=pL8R0wFFS65tNSRnaOVrsw9EOkOqxLrlUPenUYnJKNo,91
7
+ exa_py-1.3.0b0.dist-info/top_level.txt,sha256=Mfkmscdw9HWR1PtVhU1gAiVo6DHu_tyiVdb89gfZBVI,7
8
+ exa_py-1.3.0b0.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- exa_py/__init__.py,sha256=1selemczpRm1y8V9cWNm90LARnU1jbtyp-Qpx3c7cTw,28
2
- exa_py/api.py,sha256=wDdsCsQP3mACtcrmU2QSzD1a8AHGHX39smyrs39XjZo,46362
3
- exa_py/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- exa_py/utils.py,sha256=Rc1FJjoR9LQ7L_OJM91Sd1GNkbHjcLyEvJENhRix6gc,2405
5
- exa_py-1.2.1.dist-info/METADATA,sha256=pQU-Xy8_uAA9mLMkikRxvrfdbLpHv4ej1fS2Ikbsy4w,3030
6
- exa_py-1.2.1.dist-info/WHEEL,sha256=pL8R0wFFS65tNSRnaOVrsw9EOkOqxLrlUPenUYnJKNo,91
7
- exa_py-1.2.1.dist-info/top_level.txt,sha256=Mfkmscdw9HWR1PtVhU1gAiVo6DHu_tyiVdb89gfZBVI,7
8
- exa_py-1.2.1.dist-info/RECORD,,