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

@@ -0,0 +1,3 @@
1
+ from .client import WebsetWebhooksClient
2
+
3
+ __all__ = ["WebsetWebhooksClient"]
@@ -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,19 +1,24 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: exa-py
3
- Version: 1.9.0
3
+ Version: 1.10.0
4
4
  Summary: Python SDK for Exa API.
5
+ License: MIT
5
6
  Author: Exa AI
6
7
  Author-email: hello@exa.ai
7
- Requires-Python: >=3.9,<4.0
8
+ Requires-Python: >=3.9
9
+ Classifier: License :: OSI Approved :: MIT License
8
10
  Classifier: Programming Language :: Python :: 3
9
11
  Classifier: Programming Language :: Python :: 3.9
10
12
  Classifier: Programming Language :: Python :: 3.10
11
13
  Classifier: Programming Language :: Python :: 3.11
12
14
  Classifier: Programming Language :: Python :: 3.12
13
15
  Classifier: Programming Language :: Python :: 3.13
14
- Requires-Dist: openai (>=1.48,<2.0)
15
- Requires-Dist: requests (>=2.32.3,<3.0.0)
16
- Requires-Dist: typing-extensions (>=4.12.2,<5.0.0)
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)
17
22
  Description-Content-Type: text/markdown
18
23
 
19
24
  # Exa
@@ -0,0 +1,21 @@
1
+ exa_py/__init__.py,sha256=M2GC9oSdoV6m2msboW0vMWWl8wrth4o6gmEV4MYLGG8,66
2
+ exa_py/api.py,sha256=LZMOw4bu-h0J6wptXNHHgK2O5NvMOL5O9F2JjuK0qYU,82559
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.10.0.dist-info/METADATA,sha256=DcDqL0AeY0uPA4mDy6JPuQ9I2EJDDzqqCYXpFYl3rCg,3565
20
+ exa_py-1.10.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
21
+ exa_py-1.10.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.1
2
+ Generator: poetry-core 2.1.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,7 +0,0 @@
1
- exa_py/__init__.py,sha256=1selemczpRm1y8V9cWNm90LARnU1jbtyp-Qpx3c7cTw,28
2
- exa_py/api.py,sha256=Y9oeiUHGgy2a6o8aBMUbCzWSTG6VFpowO_B2WYazqBg,66264
3
- exa_py/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- exa_py/utils.py,sha256=Rc1FJjoR9LQ7L_OJM91Sd1GNkbHjcLyEvJENhRix6gc,2405
5
- exa_py-1.9.0.dist-info/METADATA,sha256=1s4-K0s9Sf443Kkm0pLZ1vZvRd-ifOrXvdr7ZKSmbp0,3419
6
- exa_py-1.9.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
7
- exa_py-1.9.0.dist-info/RECORD,,