exa-py 1.14.1__tar.gz → 1.14.3__tar.gz

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.

Files changed (41) hide show
  1. {exa_py-1.14.1 → exa_py-1.14.3}/PKG-INFO +13 -18
  2. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/api.py +1 -1
  3. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/websets/client.py +2 -2
  4. exa_py-1.14.3/exa_py/websets/monitors/__init__.py +4 -0
  5. exa_py-1.14.3/exa_py/websets/monitors/client.py +96 -0
  6. exa_py-1.14.3/exa_py/websets/monitors/runs/__init__.py +3 -0
  7. exa_py-1.14.3/exa_py/websets/monitors/runs/client.py +38 -0
  8. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/websets/types.py +101 -87
  9. exa_py-1.14.3/exa_py.egg-info/PKG-INFO +129 -0
  10. exa_py-1.14.3/exa_py.egg-info/SOURCES.txt +34 -0
  11. exa_py-1.14.3/exa_py.egg-info/dependency_links.txt +1 -0
  12. exa_py-1.14.3/exa_py.egg-info/requires.txt +6 -0
  13. exa_py-1.14.3/exa_py.egg-info/top_level.txt +1 -0
  14. {exa_py-1.14.1 → exa_py-1.14.3}/pyproject.toml +2 -2
  15. exa_py-1.14.3/setup.cfg +4 -0
  16. exa_py-1.14.3/setup.py +26 -0
  17. exa_py-1.14.3/tests/test_monitors.py +502 -0
  18. exa_py-1.14.3/tests/test_websets.py +418 -0
  19. exa_py-1.14.1/exa_py/websets/_generator/pydantic/BaseModel.jinja2 +0 -42
  20. exa_py-1.14.1/exa_py/websets/streams/__init__.py +0 -4
  21. exa_py-1.14.1/exa_py/websets/streams/client.py +0 -96
  22. exa_py-1.14.1/exa_py/websets/streams/runs/__init__.py +0 -3
  23. exa_py-1.14.1/exa_py/websets/streams/runs/client.py +0 -38
  24. {exa_py-1.14.1 → exa_py-1.14.3}/README.md +0 -0
  25. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/__init__.py +0 -0
  26. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/py.typed +0 -0
  27. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/research/__init__.py +0 -0
  28. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/research/client.py +0 -0
  29. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/research/models.py +0 -0
  30. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/utils.py +0 -0
  31. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/websets/__init__.py +0 -0
  32. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/websets/core/__init__.py +0 -0
  33. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/websets/core/base.py +0 -0
  34. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/websets/enrichments/__init__.py +0 -0
  35. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/websets/enrichments/client.py +0 -0
  36. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/websets/items/__init__.py +0 -0
  37. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/websets/items/client.py +0 -0
  38. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/websets/searches/__init__.py +0 -0
  39. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/websets/searches/client.py +0 -0
  40. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/websets/webhooks/__init__.py +0 -0
  41. {exa_py-1.14.1 → exa_py-1.14.3}/exa_py/websets/webhooks/client.py +0 -0
@@ -1,25 +1,21 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: exa-py
3
- Version: 1.14.1
3
+ Version: 1.14.3
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
-
@@ -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],
@@ -16,7 +16,7 @@ from .items import WebsetItemsClient
16
16
  from .searches import WebsetSearchesClient
17
17
  from .enrichments import WebsetEnrichmentsClient
18
18
  from .webhooks import WebsetWebhooksClient
19
- from .streams import StreamsClient
19
+ from .monitors import MonitorsClient
20
20
 
21
21
  class WebsetsClient(WebsetsBaseClient):
22
22
  """Client for managing Websets."""
@@ -27,7 +27,7 @@ class WebsetsClient(WebsetsBaseClient):
27
27
  self.searches = WebsetSearchesClient(client)
28
28
  self.enrichments = WebsetEnrichmentsClient(client)
29
29
  self.webhooks = WebsetWebhooksClient(client)
30
- self.streams = StreamsClient(client)
30
+ self.monitors = MonitorsClient(client)
31
31
 
32
32
  def create(self, params: Union[Dict[str, Any], CreateWebsetParameters]) -> Webset:
33
33
  """Create a new Webset.
@@ -0,0 +1,4 @@
1
+ from .client import MonitorsClient
2
+ from .runs import MonitorRunsClient
3
+
4
+ __all__ = ["MonitorsClient", "MonitorRunsClient"]
@@ -0,0 +1,96 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Dict, Any, Union, Optional
4
+
5
+ from ..types import (
6
+ Monitor,
7
+ CreateMonitorParameters,
8
+ UpdateMonitor,
9
+ ListMonitorsResponse,
10
+ )
11
+ from ..core.base import WebsetsBaseClient
12
+ from .runs import MonitorRunsClient
13
+
14
+ class MonitorsClient(WebsetsBaseClient):
15
+ """Client for managing Monitors."""
16
+
17
+ def __init__(self, client):
18
+ super().__init__(client)
19
+ self.runs = MonitorRunsClient(client)
20
+
21
+ def create(self, params: Union[Dict[str, Any], CreateMonitorParameters]) -> Monitor:
22
+ """Create a new Monitor to continuously keep your Websets updated with fresh data.
23
+
24
+ Monitors automatically run on your defined schedule to ensure your Websets stay current without manual intervention:
25
+ - Find new content: Execute search operations to discover fresh items matching your criteria
26
+ - Update existing content: Run refresh operations to update items contents and enrichments
27
+ - Automated scheduling: Configure frequency, timezone, and execution times
28
+
29
+ Args:
30
+ params (CreateMonitorParameters): The parameters for creating a monitor.
31
+
32
+ Returns:
33
+ Monitor: The created monitor.
34
+ """
35
+ response = self.request("/v0/monitors", data=params)
36
+ return Monitor.model_validate(response)
37
+
38
+ def get(self, monitor_id: str) -> Monitor:
39
+ """Get a specific monitor.
40
+
41
+ Args:
42
+ monitor_id (str): The id of the Monitor.
43
+
44
+ Returns:
45
+ Monitor: The retrieved monitor.
46
+ """
47
+ response = self.request(f"/v0/monitors/{monitor_id}", method="GET")
48
+ return Monitor.model_validate(response)
49
+
50
+ def list(self, *, cursor: Optional[str] = None, limit: Optional[int] = None, webset_id: Optional[str] = None) -> ListMonitorsResponse:
51
+ """List all monitors.
52
+
53
+ Args:
54
+ cursor (str, optional): The cursor to paginate through the results.
55
+ limit (int, optional): The number of results to return (1-200, default 25).
56
+ webset_id (str, optional): The id of the Webset to list monitors for.
57
+
58
+ Returns:
59
+ ListMonitorsResponse: List of monitors with pagination info.
60
+ """
61
+ params = {
62
+ k: v
63
+ for k, v in {
64
+ "cursor": cursor,
65
+ "limit": limit,
66
+ "websetId": webset_id
67
+ }.items()
68
+ if v is not None
69
+ }
70
+ response = self.request("/v0/monitors", params=params, method="GET")
71
+ return ListMonitorsResponse.model_validate(response)
72
+
73
+ def update(self, monitor_id: str, params: Union[Dict[str, Any], UpdateMonitor]) -> Monitor:
74
+ """Update a monitor configuration.
75
+
76
+ Args:
77
+ monitor_id (str): The id of the Monitor.
78
+ params (UpdateMonitor): The parameters for updating a monitor.
79
+
80
+ Returns:
81
+ Monitor: The updated monitor.
82
+ """
83
+ response = self.request(f"/v0/monitors/{monitor_id}", data=params, method="PATCH")
84
+ return Monitor.model_validate(response)
85
+
86
+ def delete(self, monitor_id: str) -> Monitor:
87
+ """Delete a monitor.
88
+
89
+ Args:
90
+ monitor_id (str): The id of the Monitor.
91
+
92
+ Returns:
93
+ Monitor: The deleted monitor.
94
+ """
95
+ response = self.request(f"/v0/monitors/{monitor_id}", method="DELETE")
96
+ return Monitor.model_validate(response)
@@ -0,0 +1,3 @@
1
+ from .client import MonitorRunsClient
2
+
3
+ __all__ = ["MonitorRunsClient"]
@@ -0,0 +1,38 @@
1
+ from __future__ import annotations
2
+
3
+ from ...types import (
4
+ MonitorRun,
5
+ ListMonitorRunsResponse,
6
+ )
7
+ from ...core.base import WebsetsBaseClient
8
+
9
+ class MonitorRunsClient(WebsetsBaseClient):
10
+ """Client for managing Monitor Runs."""
11
+
12
+ def __init__(self, client):
13
+ super().__init__(client)
14
+
15
+ def list(self, monitor_id: str) -> ListMonitorRunsResponse:
16
+ """List all runs for the Monitor.
17
+
18
+ Args:
19
+ monitor_id (str): The id of the Monitor to list runs for.
20
+
21
+ Returns:
22
+ ListMonitorRunsResponse: List of monitor runs.
23
+ """
24
+ response = self.request(f"/v0/monitors/{monitor_id}/runs", method="GET")
25
+ return ListMonitorRunsResponse.model_validate(response)
26
+
27
+ def get(self, monitor_id: str, run_id: str) -> MonitorRun:
28
+ """Get a specific monitor run.
29
+
30
+ Args:
31
+ monitor_id (str): The id of the Monitor to get the run for.
32
+ run_id (str): The id of the monitor run.
33
+
34
+ Returns:
35
+ MonitorRun: The monitor run details.
36
+ """
37
+ response = self.request(f"/v0/monitors/{monitor_id}/runs/{run_id}", method="GET")
38
+ return MonitorRun.model_validate(response)