exa-py 1.13.0__py3-none-any.whl → 1.13.2__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.

@@ -1,21 +1,25 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.3
2
2
  Name: exa-py
3
- Version: 1.13.0
3
+ Version: 1.13.2
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>
8
5
  License: MIT
6
+ Author: Exa AI
7
+ Author-email: hello@exa.ai
9
8
  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)
10
22
  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
19
23
 
20
24
  # Exa
21
25
 
@@ -41,6 +45,7 @@ exa = Exa(api_key="your-api-key")
41
45
  ```
42
46
 
43
47
  ## Common requests
48
+
44
49
  ```python
45
50
 
46
51
  # basic search
@@ -59,9 +64,9 @@ exa = Exa(api_key="your-api-key")
59
64
  results = exa.search_and_contents("This is a Exa query:")
60
65
 
61
66
  # search and get contents with contents options
62
- results = exa.search_and_contents("This is a Exa query:",
67
+ results = exa.search_and_contents("This is a Exa query:",
63
68
  text={"include_html_tags": True, "max_characters": 1000})
64
-
69
+
65
70
  # find similar documents
66
71
  results = exa.find_similar("https://example.com")
67
72
 
@@ -75,7 +80,7 @@ exa = Exa(api_key="your-api-key")
75
80
  results = exa.get_contents(["tesla.com"])
76
81
 
77
82
  # get contents with contents options
78
- results = exa.get_contents(["urls"],
83
+ results = exa.get_contents(["urls"],
79
84
  text={"include_html_tags": True, "max_characters": 1000})
80
85
 
81
86
  # basic answer
@@ -91,5 +96,38 @@ exa = Exa(api_key="your-api-key")
91
96
  for chunk in response:
92
97
  print(chunk, end='', flush=True)
93
98
 
99
+ # research task example – answer a question with citations
100
+ # Example prompt & schema inspired by the TypeScript example.
101
+ QUESTION = (
102
+ "Summarize the history of San Francisco highlighting one or two major events "
103
+ "for each decade from 1850 to 1950"
104
+ )
105
+ OUTPUT_SCHEMA: Dict[str, Any] = {
106
+ "type": "object",
107
+ "required": ["timeline"],
108
+ "properties": {
109
+ "timeline": {
110
+ "type": "array",
111
+ "items": {
112
+ "type": "object",
113
+ "required": ["decade", "notableEvents"],
114
+ "properties": {
115
+ "decade": {
116
+ "type": "string",
117
+ "description": 'Decade label e.g. "1850s"',
118
+ },
119
+ "notableEvents": {
120
+ "type": "string",
121
+ "description": "A summary of notable events.",
122
+ },
123
+ },
124
+ },
125
+ },
126
+ },
127
+ }
128
+ resp = exa.research.create_task(
129
+ input_instructions=QUESTION,
130
+ output_schema=OUTPUT_SCHEMA,
131
+ )
94
132
  ```
95
133
 
@@ -0,0 +1,28 @@
1
+ exa_py/__init__.py,sha256=M2GC9oSdoV6m2msboW0vMWWl8wrth4o6gmEV4MYLGG8,66
2
+ exa_py/api.py,sha256=Bn7h_eRvXmwBUmJi2B2JpHAQPrHfbwKf0A-XVXLjqa0,84876
3
+ exa_py/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ exa_py/research/__init__.py,sha256=D1xgm4VlbWtRb1cMgshcW4dIyR7IXhOW2s7ihxcE1Jc,195
5
+ exa_py/research/client.py,sha256=Zno5xblfwhX8gWgc4OvI24a-ZS7_g1b32_tr6j7C7Jg,8217
6
+ exa_py/research/models.py,sha256=WXTnALhM9FcVQ95Tzzc5EDKU48hyPhu8RSMmipqCjOk,2982
7
+ exa_py/utils.py,sha256=Rc1FJjoR9LQ7L_OJM91Sd1GNkbHjcLyEvJENhRix6gc,2405
8
+ exa_py/websets/__init__.py,sha256=uOBAb9VrIHrPKoddGOp2ai2KgWlyUVCLMZqfbGOlboA,70
9
+ exa_py/websets/_generator/pydantic/BaseModel.jinja2,sha256=RUDCmPZVamoVx1WudylscYFfDhGoNNtRYlpTvKjAiuA,1276
10
+ exa_py/websets/client.py,sha256=sC_drkIAV4Umk4IS8aNYN47xYasa2bcHQNxzOwjFYwM,4807
11
+ exa_py/websets/core/__init__.py,sha256=xOyrFaqtBocMUu321Jpbk7IzIQRNZufSIGJXrKoG-Bg,323
12
+ exa_py/websets/core/base.py,sha256=thVIeRtlabbvueP0dAni5Nwtl9AWYv1I1Mmyc_jlYO0,4086
13
+ exa_py/websets/enrichments/__init__.py,sha256=5dJIEKKceUost3RnI6PpCSB3VjUCBzxseEsIXu-ZY-Y,83
14
+ exa_py/websets/enrichments/client.py,sha256=obUjn4vH6tKBMtHEBVdMzlN8in0Fx3sCP-bXx-Le1zM,2338
15
+ exa_py/websets/items/__init__.py,sha256=DCWZJVtRmUjnMEkKdb5gW1LT9cHcb-J8lENMnyyBeKU,71
16
+ exa_py/websets/items/client.py,sha256=oZoYr52WrE76Ox6GyoS9rMn7bTrIpno0FKgIWFtb57U,2796
17
+ exa_py/websets/searches/__init__.py,sha256=_0Zx8ES5fFTEL3T8mhLxq_xK2t0JONx6ad6AtbvClsE,77
18
+ exa_py/websets/searches/client.py,sha256=X3f7axWGfecmxf-2tBTX0Yf_--xToz1X8ZHbbudEzy0,1790
19
+ exa_py/websets/streams/__init__.py,sha256=Bf0uikT_lGZINZHIeweRrHLN8np953v-jKIYFdS_ilg,118
20
+ exa_py/websets/streams/client.py,sha256=eoGmIjV1rIZvENh2OYu1KmG660aWTUXDM7dNlxvdTxg,3468
21
+ exa_py/websets/streams/runs/__init__.py,sha256=o5A7mgl9KtrqVFN_uCHPxTcKTVI3fmURZPM6_Uowg1g,69
22
+ exa_py/websets/streams/runs/client.py,sha256=ja63-G0Y74YDgsWq30aoa0llIx8I9mIwbCbtACz7zXQ,1204
23
+ exa_py/websets/types.py,sha256=-KmC6N9LMh5fPhhXZslmUyQcSmBqIdPF-qQ27qS4GEw,34756
24
+ exa_py/websets/webhooks/__init__.py,sha256=iTPBCxFd73z4RifLQMX6iRECx_6pwlI5qscLNjMOUHE,77
25
+ exa_py/websets/webhooks/client.py,sha256=zsIRMTeJU65yj-zo7Zz-gG02Prtzgcx6utGFSoY4HQQ,4222
26
+ exa_py-1.13.2.dist-info/METADATA,sha256=kvXQv5_-4BJ0uIYLfZ-c9aJOfqE_0STUZ3oM-GX2Jfs,4098
27
+ exa_py-1.13.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
28
+ exa_py-1.13.2.dist-info/RECORD,,
@@ -1,5 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0.post0)
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
-
@@ -1,21 +0,0 @@
1
- exa_py/__init__.py,sha256=M2GC9oSdoV6m2msboW0vMWWl8wrth4o6gmEV4MYLGG8,66
2
- exa_py/api.py,sha256=0Xa2s-ZhOI4mynqZ6zZQW5tWwRK_SNQNUvmwhEPPk4s,87147
3
- exa_py/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- exa_py/utils.py,sha256=Rc1FJjoR9LQ7L_OJM91Sd1GNkbHjcLyEvJENhRix6gc,2405
5
- exa_py/websets/__init__.py,sha256=uOBAb9VrIHrPKoddGOp2ai2KgWlyUVCLMZqfbGOlboA,70
6
- exa_py/websets/client.py,sha256=GWHebkvfiGY46sIuksAhYE1RLJrHQVS2PGhlA3xbxhE,4757
7
- exa_py/websets/types.py,sha256=jKnJFAHTFN55EzsusgDce-yux71zVbdSJ1m8utR4EjU,28096
8
- exa_py/websets/core/__init__.py,sha256=xOyrFaqtBocMUu321Jpbk7IzIQRNZufSIGJXrKoG-Bg,323
9
- exa_py/websets/core/base.py,sha256=2vCkPLEKI2K2U7d-76kqVL7qyye007iDdp15GseJN1c,3936
10
- exa_py/websets/enrichments/__init__.py,sha256=5dJIEKKceUost3RnI6PpCSB3VjUCBzxseEsIXu-ZY-Y,83
11
- exa_py/websets/enrichments/client.py,sha256=obUjn4vH6tKBMtHEBVdMzlN8in0Fx3sCP-bXx-Le1zM,2338
12
- exa_py/websets/items/__init__.py,sha256=DCWZJVtRmUjnMEkKdb5gW1LT9cHcb-J8lENMnyyBeKU,71
13
- exa_py/websets/items/client.py,sha256=oZoYr52WrE76Ox6GyoS9rMn7bTrIpno0FKgIWFtb57U,2796
14
- exa_py/websets/searches/__init__.py,sha256=_0Zx8ES5fFTEL3T8mhLxq_xK2t0JONx6ad6AtbvClsE,77
15
- exa_py/websets/searches/client.py,sha256=X3f7axWGfecmxf-2tBTX0Yf_--xToz1X8ZHbbudEzy0,1790
16
- exa_py/websets/webhooks/__init__.py,sha256=iTPBCxFd73z4RifLQMX6iRECx_6pwlI5qscLNjMOUHE,77
17
- exa_py/websets/webhooks/client.py,sha256=zsIRMTeJU65yj-zo7Zz-gG02Prtzgcx6utGFSoY4HQQ,4222
18
- exa_py-1.13.0.dist-info/METADATA,sha256=gRNplBW67MFSW6rKGHP-i_1R6VhyNy68Yxjh4n07rsA,2726
19
- exa_py-1.13.0.dist-info/WHEEL,sha256=FBI2p9UMPaLApXXRpz7jgjcaDrkbla1BGsqZ5aB70OM,97
20
- exa_py-1.13.0.dist-info/top_level.txt,sha256=Mfkmscdw9HWR1PtVhU1gAiVo6DHu_tyiVdb89gfZBVI,7
21
- exa_py-1.13.0.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- exa_py