exa-py 1.8.9__py3-none-any.whl → 1.9.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.
Potentially problematic release.
This version of exa-py might be problematic. Click here for more details.
- exa_py/api.py +59 -8
- exa_py/websets/__init__.py +5 -0
- exa_py/websets/_generator/pydantic/BaseModel.jinja2 +42 -0
- exa_py/websets/client.py +126 -0
- exa_py/websets/core/__init__.py +9 -0
- exa_py/websets/core/base.py +41 -0
- exa_py/websets/enrichments/__init__.py +3 -0
- exa_py/websets/enrichments/client.py +65 -0
- exa_py/websets/items/__init__.py +3 -0
- exa_py/websets/items/client.py +78 -0
- exa_py/websets/searches/__init__.py +3 -0
- exa_py/websets/searches/client.py +52 -0
- exa_py/websets/types.py +1054 -0
- exa_py/websets/webhooks/__init__.py +3 -0
- exa_py/websets/webhooks/client.py +80 -0
- {exa_py-1.8.9.dist-info → exa_py-1.9.1.dist-info}/METADATA +13 -13
- exa_py-1.9.1.dist-info/RECORD +21 -0
- {exa_py-1.8.9.dist-info → exa_py-1.9.1.dist-info}/WHEEL +1 -2
- exa_py-1.8.9.dist-info/RECORD +0 -8
- exa_py-1.8.9.dist-info/top_level.txt +0 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..types import (
|
|
6
|
+
CreateWebhookParameters,
|
|
7
|
+
Webhook,
|
|
8
|
+
ListWebhooksResponse,
|
|
9
|
+
UpdateWebhookParameters,
|
|
10
|
+
)
|
|
11
|
+
from ..core.base import WebsetsBaseClient
|
|
12
|
+
|
|
13
|
+
class WebsetWebhooksClient(WebsetsBaseClient):
|
|
14
|
+
"""Client for managing Webset Webhooks."""
|
|
15
|
+
|
|
16
|
+
def __init__(self, client):
|
|
17
|
+
super().__init__(client)
|
|
18
|
+
|
|
19
|
+
def create(self, params: CreateWebhookParameters) -> Webhook:
|
|
20
|
+
"""Create a Webhook.
|
|
21
|
+
|
|
22
|
+
Args:
|
|
23
|
+
params (CreateWebhookParameters): The parameters for creating a webhook.
|
|
24
|
+
|
|
25
|
+
Returns:
|
|
26
|
+
Webhook: The created webhook.
|
|
27
|
+
"""
|
|
28
|
+
response = self.request("/v0/webhooks", data=params.model_dump(by_alias=True, exclude_none=True))
|
|
29
|
+
return Webhook.model_validate(response)
|
|
30
|
+
|
|
31
|
+
def get(self, id: str) -> Webhook:
|
|
32
|
+
"""Get a Webhook by ID.
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
id (str): The id of the webhook.
|
|
36
|
+
|
|
37
|
+
Returns:
|
|
38
|
+
Webhook: The retrieved webhook.
|
|
39
|
+
"""
|
|
40
|
+
response = self.request(f"/v0/webhooks/{id}", method="GET")
|
|
41
|
+
return Webhook.model_validate(response)
|
|
42
|
+
|
|
43
|
+
def list(self, *, cursor: Optional[str] = None, limit: Optional[int] = None) -> ListWebhooksResponse:
|
|
44
|
+
"""List all Webhooks.
|
|
45
|
+
|
|
46
|
+
Args:
|
|
47
|
+
cursor (str, optional): The cursor to paginate through the results.
|
|
48
|
+
limit (int, optional): The number of results to return (max 200).
|
|
49
|
+
|
|
50
|
+
Returns:
|
|
51
|
+
ListWebhooksResponse: List of webhooks.
|
|
52
|
+
"""
|
|
53
|
+
params = {k: v for k, v in {"cursor": cursor, "limit": limit}.items() if v is not None}
|
|
54
|
+
response = self.request("/v0/webhooks", params=params, method="GET")
|
|
55
|
+
return ListWebhooksResponse.model_validate(response)
|
|
56
|
+
|
|
57
|
+
def update(self, id: str, params: UpdateWebhookParameters) -> Webhook:
|
|
58
|
+
"""Update a Webhook.
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
id (str): The id of the webhook.
|
|
62
|
+
params (UpdateWebhookParameters): The parameters for updating a webhook.
|
|
63
|
+
|
|
64
|
+
Returns:
|
|
65
|
+
Webhook: The updated webhook.
|
|
66
|
+
"""
|
|
67
|
+
response = self.request(f"/v0/webhooks/{id}", data=params.model_dump(by_alias=True, exclude_none=True), method="PATCH")
|
|
68
|
+
return Webhook.model_validate(response)
|
|
69
|
+
|
|
70
|
+
def delete(self, id: str) -> Webhook:
|
|
71
|
+
"""Delete a Webhook.
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
id (str): The id of the webhook.
|
|
75
|
+
|
|
76
|
+
Returns:
|
|
77
|
+
Webhook: The deleted webhook.
|
|
78
|
+
"""
|
|
79
|
+
response = self.request(f"/v0/webhooks/{id}", method="DELETE")
|
|
80
|
+
return Webhook.model_validate(response)
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name:
|
|
3
|
-
Version: 1.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: exa-py
|
|
3
|
+
Version: 1.9.1
|
|
4
4
|
Summary: Python SDK for Exa API.
|
|
5
|
-
|
|
6
|
-
Author: Exa
|
|
5
|
+
Author: Exa AI
|
|
7
6
|
Author-email: hello@exa.ai
|
|
8
|
-
|
|
9
|
-
Classifier:
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Typing :: Typed
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
7
|
+
Requires-Python: >=3.9,<4.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
9
|
Classifier: Programming Language :: Python :: 3.9
|
|
14
10
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Requires-Dist: openai (>=1.48,<2.0)
|
|
15
|
+
Requires-Dist: pydantic (>=2.10.6,<3.0.0)
|
|
16
|
+
Requires-Dist: pytest-mock (>=3.14.0,<4.0.0)
|
|
17
|
+
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
|
18
|
+
Requires-Dist: typing-extensions (>=4.12.2,<5.0.0)
|
|
17
19
|
Description-Content-Type: text/markdown
|
|
18
|
-
Requires-Dist: requests
|
|
19
|
-
Requires-Dist: typing-extensions
|
|
20
|
-
Requires-Dist: openai >=1.10.0
|
|
21
20
|
|
|
22
21
|
# Exa
|
|
23
22
|
|
|
@@ -106,3 +105,4 @@ exa = Exa(api_key="your-api-key")
|
|
|
106
105
|
|
|
107
106
|
```
|
|
108
107
|
|
|
108
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
exa_py/__init__.py,sha256=1selemczpRm1y8V9cWNm90LARnU1jbtyp-Qpx3c7cTw,28
|
|
2
|
+
exa_py/api.py,sha256=V-DzDqZr7LAoBA-vN6cNj2tfqA-15zGLTnRfg30IZtU,67201
|
|
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/_generator/pydantic/BaseModel.jinja2,sha256=RUDCmPZVamoVx1WudylscYFfDhGoNNtRYlpTvKjAiuA,1276
|
|
7
|
+
exa_py/websets/client.py,sha256=2CWf0DrkmtEJgveR-tz6FqjQbzi1NzlPRCIU2ANB8IE,4380
|
|
8
|
+
exa_py/websets/core/__init__.py,sha256=xOyrFaqtBocMUu321Jpbk7IzIQRNZufSIGJXrKoG-Bg,323
|
|
9
|
+
exa_py/websets/core/base.py,sha256=bKmOwims3i78d1Mzizpya421k4LB-0YnXuX5pHKxoFo,1300
|
|
10
|
+
exa_py/websets/enrichments/__init__.py,sha256=5dJIEKKceUost3RnI6PpCSB3VjUCBzxseEsIXu-ZY-Y,83
|
|
11
|
+
exa_py/websets/enrichments/client.py,sha256=cnw0Va9fJQ9H9x0l1KwVB9EdKBb7mbV5ulAOmHuf3lE,2323
|
|
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=elDZxycmKToOPU-F2utP2ia9x5m68vEu_5ymypcCV3A,1775
|
|
16
|
+
exa_py/websets/types.py,sha256=njlUgvZJab8hg2_6tqYa5SYvuYowDNKP9MKrmV2PSq0,26559
|
|
17
|
+
exa_py/websets/webhooks/__init__.py,sha256=iTPBCxFd73z4RifLQMX6iRECx_6pwlI5qscLNjMOUHE,77
|
|
18
|
+
exa_py/websets/webhooks/client.py,sha256=jNNFzUoWXW9KOswNrZ32LUO1gSbA89XBWyQkyLrUAuE,2664
|
|
19
|
+
exa_py-1.9.1.dist-info/METADATA,sha256=Tcvz56Uc7L3QHZbkFRY2dyFkS4nfxXIBRNSj6TYz8Rg,3506
|
|
20
|
+
exa_py-1.9.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
21
|
+
exa_py-1.9.1.dist-info/RECORD,,
|
exa_py-1.8.9.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
exa_py/__init__.py,sha256=1selemczpRm1y8V9cWNm90LARnU1jbtyp-Qpx3c7cTw,28
|
|
2
|
-
exa_py/api.py,sha256=BSZ-uSRYfCyHWBMUpV4SV-2yaWustPS7xc63gArbJSE,65156
|
|
3
|
-
exa_py/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
exa_py/utils.py,sha256=Rc1FJjoR9LQ7L_OJM91Sd1GNkbHjcLyEvJENhRix6gc,2405
|
|
5
|
-
exa_py-1.8.9.dist-info/METADATA,sha256=O_ivBX4PUV2yWQPL69nSmXlqP6S0BTlTYiVMpz4nLAM,3522
|
|
6
|
-
exa_py-1.8.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
7
|
-
exa_py-1.8.9.dist-info/top_level.txt,sha256=Mfkmscdw9HWR1PtVhU1gAiVo6DHu_tyiVdb89gfZBVI,7
|
|
8
|
-
exa_py-1.8.9.dist-info/RECORD,,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exa_py
|