exa-py 1.14.2__py3-none-any.whl → 1.14.4__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
@@ -159,7 +159,7 @@ FIND_SIMILAR_OPTIONS_TYPES = {
159
159
  }
160
160
 
161
161
  # the livecrawl options
162
- LIVECRAWL_OPTIONS = Literal["always", "fallback", "never", "auto"]
162
+ LIVECRAWL_OPTIONS = Literal["always", "fallback", "never", "auto", "preferred"]
163
163
 
164
164
  CONTENTS_OPTIONS_TYPES = {
165
165
  "urls": [list],
@@ -788,6 +788,15 @@ class AsyncStreamAnswerResponse:
788
788
 
789
789
  T = TypeVar("T")
790
790
 
791
+ @dataclass
792
+ class ContentStatus:
793
+ """A class representing the status of a content retrieval operation."""
794
+
795
+ id: str
796
+ status: str
797
+ source: str
798
+
799
+
791
800
 
792
801
  @dataclass
793
802
  class SearchResponse(Generic[T]):
@@ -804,6 +813,7 @@ class SearchResponse(Generic[T]):
804
813
  autoprompt_string: Optional[str]
805
814
  resolved_search_type: Optional[str]
806
815
  auto_date: Optional[str]
816
+ statuses: Optional[List[ContentStatus]] = None
807
817
  cost_dollars: Optional[CostDollars] = None
808
818
 
809
819
  def __str__(self):
@@ -818,6 +828,8 @@ class SearchResponse(Generic[T]):
818
828
  output += f"\n - search: {self.cost_dollars.search}"
819
829
  if self.cost_dollars.contents:
820
830
  output += f"\n - contents: {self.cost_dollars.contents}"
831
+ if self.statuses:
832
+ output += f"\nStatuses: {self.statuses}"
821
833
  return output
822
834
 
823
835
 
@@ -1402,15 +1414,18 @@ class Exa:
1402
1414
  options,
1403
1415
  {**CONTENTS_OPTIONS_TYPES, **CONTENTS_ENDPOINT_OPTIONS_TYPES},
1404
1416
  )
1417
+
1405
1418
  options = to_camel_case(options)
1406
1419
  data = self.request("/contents", options)
1407
1420
  cost_dollars = parse_cost_dollars(data.get("costDollars"))
1421
+ statuses = [ContentStatus(**status) for status in data.get("statuses", [])]
1408
1422
  return SearchResponse(
1409
1423
  [Result(**to_snake_case(result)) for result in data["results"]],
1410
1424
  data.get("autopromptString"),
1411
1425
  data.get("resolvedSearchType"),
1412
1426
  data.get("autoDate"),
1413
1427
  cost_dollars=cost_dollars,
1428
+ statuses=statuses,
1414
1429
  )
1415
1430
 
1416
1431
  def find_similar(
@@ -2092,12 +2107,14 @@ class AsyncExa(Exa):
2092
2107
  options = to_camel_case(options)
2093
2108
  data = await self.async_request("/contents", options)
2094
2109
  cost_dollars = parse_cost_dollars(data.get("costDollars"))
2110
+ statuses = [ContentStatus(**status) for status in data.get("statuses", [])]
2095
2111
  return SearchResponse(
2096
2112
  [Result(**to_snake_case(result)) for result in data["results"]],
2097
2113
  data.get("autopromptString"),
2098
2114
  data.get("resolvedSearchType"),
2099
2115
  data.get("autoDate"),
2100
2116
  cost_dollars=cost_dollars,
2117
+ statuses=statuses,
2101
2118
  )
2102
2119
 
2103
2120
  async def find_similar(
@@ -1,25 +1,21 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: exa-py
3
- Version: 1.14.2
3
+ Version: 1.14.4
4
4
  Summary: Python SDK for Exa API.
5
+ Home-page: https://github.com/exa-labs/exa-py
6
+ Author: Exa
7
+ Author-email: Exa AI <hello@exa.ai>
5
8
  License: MIT
6
- Author: Exa AI
7
- Author-email: hello@exa.ai
8
9
  Requires-Python: >=3.9
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.9
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Programming Language :: Python :: 3.13
16
- Requires-Dist: httpx (>=0.28.1)
17
- Requires-Dist: openai (>=1.48)
18
- Requires-Dist: pydantic (>=2.10.6)
19
- Requires-Dist: pytest-mock (>=3.14.0)
20
- Requires-Dist: requests (>=2.32.3)
21
- Requires-Dist: typing-extensions (>=4.12.2)
22
10
  Description-Content-Type: text/markdown
11
+ Requires-Dist: requests>=2.32.3
12
+ Requires-Dist: typing-extensions>=4.12.2
13
+ Requires-Dist: openai>=1.48
14
+ Requires-Dist: pydantic>=2.10.6
15
+ Requires-Dist: pytest-mock>=3.14.0
16
+ Requires-Dist: httpx>=0.28.1
17
+ Dynamic: author
18
+ Dynamic: home-page
23
19
 
24
20
  # Exa
25
21
 
@@ -131,4 +127,3 @@ exa = Exa(api_key="your-api-key")
131
127
  output_schema=OUTPUT_SCHEMA,
132
128
  )
133
129
  ```
134
-
@@ -1,13 +1,13 @@
1
1
  exa_py/__init__.py,sha256=M2GC9oSdoV6m2msboW0vMWWl8wrth4o6gmEV4MYLGG8,66
2
- exa_py/api.py,sha256=zwTEiIkWa6Gynx5NW9VMMY4Nws63gVDRSmzKdT4v2aY,84903
2
+ exa_py/api.py,sha256=u1VIV2P9CuxJY_s3vNh4vhn4_L9daMdFMFnWQU791wk,85440
3
3
  exa_py/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ exa_py/utils.py,sha256=Rc1FJjoR9LQ7L_OJM91Sd1GNkbHjcLyEvJENhRix6gc,2405
4
5
  exa_py/research/__init__.py,sha256=QeY-j6bP4QP5tF9ytX0IeQhJvd0Wn4cJCD69U8pP7kA,271
5
6
  exa_py/research/client.py,sha256=C2ukFq_dE1xUfhMlHwpD9cY5rDClgn8N92pH4_FEVpE,11901
6
7
  exa_py/research/models.py,sha256=j7YgRoMRp2MLgnaij7775x_hJEeV5gksKpfLwmawqxY,3704
7
- exa_py/utils.py,sha256=Rc1FJjoR9LQ7L_OJM91Sd1GNkbHjcLyEvJENhRix6gc,2405
8
8
  exa_py/websets/__init__.py,sha256=uOBAb9VrIHrPKoddGOp2ai2KgWlyUVCLMZqfbGOlboA,70
9
- exa_py/websets/_generator/pydantic/BaseModel.jinja2,sha256=RUDCmPZVamoVx1WudylscYFfDhGoNNtRYlpTvKjAiuA,1276
10
9
  exa_py/websets/client.py,sha256=G3liUYP5DIlaVSoUIK7r1Jh_TgqHvpahy_oZ5OI9z0g,4811
10
+ exa_py/websets/types.py,sha256=5iD5QHtCbHAkIjeLoLf_D70t5Q59AeyCnN9PN1Z6pZ4,34562
11
11
  exa_py/websets/core/__init__.py,sha256=xOyrFaqtBocMUu321Jpbk7IzIQRNZufSIGJXrKoG-Bg,323
12
12
  exa_py/websets/core/base.py,sha256=thVIeRtlabbvueP0dAni5Nwtl9AWYv1I1Mmyc_jlYO0,4086
13
13
  exa_py/websets/enrichments/__init__.py,sha256=5dJIEKKceUost3RnI6PpCSB3VjUCBzxseEsIXu-ZY-Y,83
@@ -20,9 +20,9 @@ exa_py/websets/monitors/runs/__init__.py,sha256=TmcETf3zdQouA_vAeLiosCNL1MYJnZ0y
20
20
  exa_py/websets/monitors/runs/client.py,sha256=WnwcWCf7UKk68VCNUp8mRXBtlU8vglTSX-eoWVXzKIw,1229
21
21
  exa_py/websets/searches/__init__.py,sha256=_0Zx8ES5fFTEL3T8mhLxq_xK2t0JONx6ad6AtbvClsE,77
22
22
  exa_py/websets/searches/client.py,sha256=X3f7axWGfecmxf-2tBTX0Yf_--xToz1X8ZHbbudEzy0,1790
23
- exa_py/websets/types.py,sha256=5iD5QHtCbHAkIjeLoLf_D70t5Q59AeyCnN9PN1Z6pZ4,34562
24
23
  exa_py/websets/webhooks/__init__.py,sha256=iTPBCxFd73z4RifLQMX6iRECx_6pwlI5qscLNjMOUHE,77
25
24
  exa_py/websets/webhooks/client.py,sha256=zsIRMTeJU65yj-zo7Zz-gG02Prtzgcx6utGFSoY4HQQ,4222
26
- exa_py-1.14.2.dist-info/METADATA,sha256=fkHu-6md_rBhdxa7IgROf-p8nuiMT8SHAAVIPdL1_94,4120
27
- exa_py-1.14.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
28
- exa_py-1.14.2.dist-info/RECORD,,
25
+ exa_py-1.14.4.dist-info/METADATA,sha256=na8BxzRz6YUINUZOYOme8YR8KfnZCZschPbHNaINDbw,3835
26
+ exa_py-1.14.4.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
27
+ exa_py-1.14.4.dist-info/top_level.txt,sha256=Mfkmscdw9HWR1PtVhU1gAiVo6DHu_tyiVdb89gfZBVI,7
28
+ exa_py-1.14.4.dist-info/RECORD,,
@@ -1,4 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.3
2
+ Generator: setuptools (80.3.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ exa_py
@@ -1,42 +0,0 @@
1
- {% for decorator in decorators -%}
2
- {{ decorator }}
3
- {% endfor -%}
4
- class {{ class_name }}({{ base_class }}):{% if comment is defined %} # {{ comment }}{% endif %}
5
- {%- if description %}
6
- """
7
- {{ description | indent(4) }}
8
- """
9
- {%- endif %}
10
- {%- if not fields and not description %}
11
- pass
12
- {%- endif %}
13
- {%- if config %}
14
- {%- filter indent(4) %}
15
- {%- endfilter %}
16
- {%- endif %}
17
- {%- for field in fields -%}
18
- {%- if field.name == "type" and field.field %}
19
- type: Literal['{{ field.default }}']
20
- {%- elif field.name == "object" and field.field %}
21
- object: Literal['{{ field.default }}']
22
- {%- elif not field.annotated and field.field %}
23
- {{ field.name }}: {{ field.type_hint }} = {{ field.field }}
24
- {%- else %}
25
- {%- if field.annotated %}
26
- {{ field.name }}: {{ field.annotated }}
27
- {%- else %}
28
- {{ field.name }}: {{ field.type_hint }}
29
- {%- endif %}
30
- {%- if not (field.required or (field.represented_default == 'None' and field.strip_default_none)) or field.data_type.is_optional
31
- %} = {{ field.represented_default }}
32
- {%- endif -%}
33
- {%- endif %}
34
- {%- if field.docstring %}
35
- """
36
- {{ field.docstring | indent(4) }}
37
- """
38
- {%- endif %}
39
- {%- for method in methods -%}
40
- {{ method }}
41
- {%- endfor -%}
42
- {%- endfor -%}