exa-py 1.14.1__tar.gz → 1.14.2__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 (32) hide show
  1. {exa_py-1.14.1 → exa_py-1.14.2}/PKG-INFO +1 -1
  2. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/client.py +2 -2
  3. exa_py-1.14.2/exa_py/websets/monitors/__init__.py +4 -0
  4. exa_py-1.14.2/exa_py/websets/monitors/client.py +96 -0
  5. exa_py-1.14.2/exa_py/websets/monitors/runs/__init__.py +3 -0
  6. exa_py-1.14.2/exa_py/websets/monitors/runs/client.py +38 -0
  7. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/types.py +101 -87
  8. {exa_py-1.14.1 → exa_py-1.14.2}/pyproject.toml +2 -2
  9. exa_py-1.14.1/exa_py/websets/streams/__init__.py +0 -4
  10. exa_py-1.14.1/exa_py/websets/streams/client.py +0 -96
  11. exa_py-1.14.1/exa_py/websets/streams/runs/__init__.py +0 -3
  12. exa_py-1.14.1/exa_py/websets/streams/runs/client.py +0 -38
  13. {exa_py-1.14.1 → exa_py-1.14.2}/README.md +0 -0
  14. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/__init__.py +0 -0
  15. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/api.py +0 -0
  16. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/py.typed +0 -0
  17. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/research/__init__.py +0 -0
  18. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/research/client.py +0 -0
  19. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/research/models.py +0 -0
  20. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/utils.py +0 -0
  21. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/__init__.py +0 -0
  22. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/_generator/pydantic/BaseModel.jinja2 +0 -0
  23. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/core/__init__.py +0 -0
  24. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/core/base.py +0 -0
  25. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/enrichments/__init__.py +0 -0
  26. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/enrichments/client.py +0 -0
  27. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/items/__init__.py +0 -0
  28. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/items/client.py +0 -0
  29. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/searches/__init__.py +0 -0
  30. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/searches/client.py +0 -0
  31. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/webhooks/__init__.py +0 -0
  32. {exa_py-1.14.1 → exa_py-1.14.2}/exa_py/websets/webhooks/client.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: exa-py
3
- Version: 1.14.1
3
+ Version: 1.14.2
4
4
  Summary: Python SDK for Exa API.
5
5
  License: MIT
6
6
  Author: Exa AI
@@ -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)
@@ -11,7 +11,7 @@ from typing import Any, Dict, List, Literal, Optional, Union
11
11
  from pydantic import AnyUrl, Field, PositiveInt, confloat, constr
12
12
  from .core.base import ExaBaseModel
13
13
 
14
- class StreamBehaviorSearchConfig(ExaBaseModel):
14
+ class MonitorBehaviorSearchConfig(ExaBaseModel):
15
15
  query: constr(min_length=2, max_length=10000)
16
16
  criteria: List[SearchCriterion] = Field(..., max_items=5)
17
17
  entity: Union[
@@ -59,20 +59,20 @@ class CreateEnrichmentParameters(ExaBaseModel):
59
59
  """
60
60
 
61
61
 
62
- class CreateStreamParameters(ExaBaseModel):
62
+ class CreateMonitorParameters(ExaBaseModel):
63
63
  webset_id: str = Field(..., alias='websetId')
64
64
  """
65
65
  The id of the Webset
66
66
  """
67
- cadence: StreamCadence
67
+ cadence: MonitorCadence
68
68
  """
69
- How often the stream will run
69
+ How often the monitor will run
70
70
  """
71
- behavior: Union[StreamBehaviorSearch, StreamBehaviorRefresh] = Field(
71
+ behavior: Union[MonitorBehaviorSearch, MonitorBehaviorRefresh] = Field(
72
72
  ..., discriminator='type'
73
73
  )
74
74
  """
75
- Behavior to perform when stream runs
75
+ Behavior to perform when monitor runs
76
76
  """
77
77
  metadata: Optional[Dict[str, Any]] = None
78
78
 
@@ -198,11 +198,11 @@ class EnrichmentResult(ExaBaseModel):
198
198
  """
199
199
  enrichment_id: str = Field(..., alias='enrichmentId')
200
200
  """
201
- The id of the Enrichment that generated the result
201
+ The unique identifier for the enrichment
202
202
  """
203
203
 
204
204
 
205
- class StreamRefreshBehaviorEnrichmentsConfigEnrichments(ExaBaseModel):
205
+ class MonitorRefreshBehaviorEnrichmentsConfigEnrichments(ExaBaseModel):
206
206
  """
207
207
  Only refresh specific enrichments
208
208
  """
@@ -224,6 +224,7 @@ class EventType(Enum):
224
224
  webset_item_created = 'webset.item.created'
225
225
  webset_item_enriched = 'webset.item.enriched'
226
226
 
227
+
227
228
  class Format(Enum):
228
229
  """
229
230
  Format of the enrichment response.
@@ -263,14 +264,14 @@ class ListEventsResponse(ExaBaseModel):
263
264
  """
264
265
  next_cursor: Optional[str] = Field(None, alias='nextCursor')
265
266
  """
266
- The cursor to paginate through the next set of results
267
+ The cursor to use for the next page of results
267
268
  """
268
269
 
269
270
 
270
- class ListStreamRunsResponse(ExaBaseModel):
271
- data: List[StreamRun]
271
+ class ListMonitorRunsResponse(ExaBaseModel):
272
+ data: List[MonitorRun]
272
273
  """
273
- The list of stream runs
274
+ The list of monitor runs
274
275
  """
275
276
  has_more: bool = Field(..., alias='hasMore')
276
277
  """
@@ -278,14 +279,14 @@ class ListStreamRunsResponse(ExaBaseModel):
278
279
  """
279
280
  next_cursor: Optional[str] = Field(None, alias='nextCursor')
280
281
  """
281
- The cursor to paginate through the next set of results
282
+ The cursor to use for the next page of results
282
283
  """
283
284
 
284
285
 
285
- class ListStreamsResponse(ExaBaseModel):
286
- data: List[Stream]
286
+ class ListMonitorsResponse(ExaBaseModel):
287
+ data: List[Monitor]
287
288
  """
288
- The list of streams
289
+ The list of monitors
289
290
  """
290
291
  has_more: bool = Field(..., alias='hasMore')
291
292
  """
@@ -293,7 +294,7 @@ class ListStreamsResponse(ExaBaseModel):
293
294
  """
294
295
  next_cursor: Optional[str] = Field(None, alias='nextCursor')
295
296
  """
296
- The cursor to paginate through the next set of results
297
+ The cursor to use for the next page of results
297
298
  """
298
299
 
299
300
 
@@ -308,7 +309,7 @@ class ListWebhookAttemptsResponse(ExaBaseModel):
308
309
  """
309
310
  next_cursor: Optional[str] = Field(None, alias='nextCursor')
310
311
  """
311
- The cursor to paginate through the next set of results
312
+ The cursor to use for the next page of results
312
313
  """
313
314
 
314
315
 
@@ -323,7 +324,7 @@ class ListWebhooksResponse(ExaBaseModel):
323
324
  """
324
325
  next_cursor: Optional[str] = Field(None, alias='nextCursor')
325
326
  """
326
- The cursor to paginate through the next set of results
327
+ The cursor to use for the next page of results
327
328
  """
328
329
 
329
330
 
@@ -338,7 +339,7 @@ class ListWebsetItemResponse(ExaBaseModel):
338
339
  """
339
340
  next_cursor: Optional[str] = Field(None, alias='nextCursor')
340
341
  """
341
- The cursor to paginate through the next set of Items
342
+ The cursor to use for the next page of results
342
343
  """
343
344
 
344
345
 
@@ -353,15 +354,17 @@ class ListWebsetsResponse(ExaBaseModel):
353
354
  """
354
355
  next_cursor: Optional[str] = Field(None, alias='nextCursor')
355
356
  """
356
- The cursor to paginate through the next set of results
357
+ The cursor to use for the next page of results
357
358
  """
358
359
 
360
+
359
361
  class Option(ExaBaseModel):
360
362
  label: str
361
363
  """
362
364
  The label of the option
363
365
  """
364
366
 
367
+
365
368
  class Progress(ExaBaseModel):
366
369
  """
367
370
  The progress of the search
@@ -446,7 +449,7 @@ class CreateWebsetParametersSearch(ExaBaseModel):
446
449
  """
447
450
  Criteria every item is evaluated against.
448
451
 
449
- It's not required to provide your own criteria, we automatically detect the criteria from all the information provided in the query. Only use this when you need more fine control.
452
+ It's not required to provide your own criteria, we automatically detect the criteria from all the information provided in the query.
450
453
  """
451
454
 
452
455
 
@@ -459,9 +462,9 @@ class Source(Enum):
459
462
  import_ = 'import'
460
463
 
461
464
 
462
- class StreamRunStatus(Enum):
465
+ class MonitorRunStatus(Enum):
463
466
  """
464
- The status of the Stream Run
467
+ The status of the Monitor Run
465
468
  """
466
469
 
467
470
  created = 'created'
@@ -470,45 +473,45 @@ class StreamRunStatus(Enum):
470
473
  canceled = 'canceled'
471
474
 
472
475
 
473
- class StreamStatus(Enum):
476
+ class MonitorStatus(Enum):
474
477
  """
475
- The status of the Stream
478
+ The status of the Monitor
476
479
  """
477
480
 
478
- open = 'open'
479
- closed = 'closed'
481
+ enabled = 'enabled'
482
+ disabled = 'disabled'
480
483
 
481
484
 
482
- class Stream(ExaBaseModel):
485
+ class Monitor(ExaBaseModel):
483
486
  id: str
484
487
  """
485
- The unique identifier for the Stream
488
+ The unique identifier for the Monitor
486
489
  """
487
- object: str = 'stream'
490
+ object: str = 'monitor'
488
491
  """
489
492
  The type of object
490
493
  """
491
- status: StreamStatus
494
+ status: MonitorStatus
492
495
  """
493
- The status of the Stream
496
+ The status of the Monitor
494
497
  """
495
498
  webset_id: str = Field(..., alias='websetId')
496
499
  """
497
- The id of the Webset the Stream belongs to
500
+ The id of the Webset the Monitor belongs to
498
501
  """
499
- cadence: StreamCadence
502
+ cadence: MonitorCadence
500
503
  """
501
- How often the stream will run
504
+ How often the monitor will run
502
505
  """
503
- behavior: Union[StreamBehaviorSearch, StreamBehaviorRefresh] = Field(
506
+ behavior: Union[MonitorBehaviorSearch, MonitorBehaviorRefresh] = Field(
504
507
  ..., discriminator='type'
505
508
  )
506
509
  """
507
- Behavior to perform when stream runs
510
+ Behavior to perform when monitor runs
508
511
  """
509
- last_run: Optional[StreamRun] = Field(None, alias='lastRun', title='StreamRun')
512
+ last_run: Optional[MonitorRun] = Field(None, alias='lastRun', title='MonitorRun')
510
513
  """
511
- The last run of the stream
514
+ The last run of the monitor
512
515
  """
513
516
  next_run_at: Optional[datetime] = Field(None, alias='nextRunAt')
514
517
  """
@@ -520,72 +523,66 @@ class Stream(ExaBaseModel):
520
523
  """
521
524
  created_at: datetime = Field(..., alias='createdAt')
522
525
  """
523
- When the stream was created
526
+ When the monitor was created
524
527
  """
525
528
  updated_at: datetime = Field(..., alias='updatedAt')
526
529
  """
527
- When the stream was last updated
530
+ When the monitor was last updated
528
531
  """
529
532
 
530
533
 
531
- class StreamBehaviorRefresh(ExaBaseModel):
534
+ class MonitorBehaviorRefresh(ExaBaseModel):
532
535
  type: Literal['refresh']
533
536
  config: Union[
534
- StreamRefreshBehaviorEnrichmentsConfig, StreamRefreshBehaviorContentsConfig
537
+ MonitorRefreshBehaviorEnrichmentsConfig, MonitorRefreshBehaviorContentsConfig
535
538
  ] = Field(..., discriminator='target')
536
- """
537
- Specify the target of the refresh
538
- """
539
539
 
540
540
 
541
- class StreamBehaviorSearch(ExaBaseModel):
541
+ class MonitorBehaviorSearch(ExaBaseModel):
542
542
  type: Literal['search']
543
- config: StreamBehaviorSearchConfig
543
+ config: MonitorBehaviorSearchConfig
544
544
 
545
545
 
546
- class StreamCadence(ExaBaseModel):
546
+ class MonitorCadence(ExaBaseModel):
547
547
  cron: str
548
548
  """
549
- Cron expression for stream cadence (must be a valid Unix cron with 5 fields). The schedule must trigger at most once per day.
549
+ Cron expression for monitor cadence (must be a valid Unix cron with 5 fields). The schedule must trigger at most once per day.
550
550
  """
551
551
  timezone: Optional[str] = 'Etc/UTC'
552
552
  """
553
- IANA timezone (e.g., "America/New_York")
553
+ Timezone for the cron expression
554
554
  """
555
555
 
556
556
 
557
- class StreamRefreshBehaviorContentsConfig(ExaBaseModel):
557
+ class MonitorRefreshBehaviorContentsConfig(ExaBaseModel):
558
558
  target: Literal['contents']
559
559
 
560
560
 
561
- class StreamRefreshBehaviorEnrichmentsConfig(ExaBaseModel):
561
+ class MonitorRefreshBehaviorEnrichmentsConfig(ExaBaseModel):
562
562
  target: Literal['enrichments']
563
- enrichments: Optional[StreamRefreshBehaviorEnrichmentsConfigEnrichments] = None
564
- """
565
- Only refresh specific enrichments
566
- """
563
+ enrichments: Optional[MonitorRefreshBehaviorEnrichmentsConfigEnrichments] = None
567
564
 
568
565
 
569
- class StreamRun(ExaBaseModel):
566
+ class MonitorRun(ExaBaseModel):
570
567
  id: str
571
568
  """
572
- The unique identifier for the Stream Run
569
+ The unique identifier for the Monitor Run
573
570
  """
574
- object: str = 'stream_run'
571
+ object: str = 'monitor_run'
575
572
  """
576
573
  The type of object
577
574
  """
578
- status: StreamRunStatus
575
+ status: MonitorRunStatus
579
576
  """
580
- The status of the Stream Run
577
+ The status of the Monitor Run
581
578
  """
582
- stream_id: str = Field(..., alias='streamId')
579
+ monitor_id: str = Field(..., alias='monitorId')
583
580
  """
584
- The stream that the run is associated with
581
+ The monitor that the run is associated with
585
582
  """
586
583
  type: Type
587
584
  """
588
- The type of the Stream Run
585
+ The type of the Monitor Run
589
586
  """
590
587
  completed_at: Optional[datetime] = Field(None, alias='completedAt')
591
588
  """
@@ -611,19 +608,22 @@ class StreamRun(ExaBaseModel):
611
608
 
612
609
  class Type(Enum):
613
610
  """
614
- The type of the Stream Run
611
+ The type of the Monitor Run
615
612
  """
616
613
 
617
614
  search = 'search'
618
615
  refresh = 'refresh'
619
616
 
620
617
 
621
- class UpdateStream(ExaBaseModel):
622
- status: Optional[StreamStatus] = None
618
+ class UpdateMonitor(ExaBaseModel):
619
+ status: Optional[MonitorStatus] = None
623
620
  """
624
- The status of the stream.
621
+ The status of the monitor.
625
622
  """
626
623
  metadata: Optional[Dict[str, str]] = None
624
+ """
625
+ Set of key-value pairs you want to associate with this object.
626
+ """
627
627
 
628
628
 
629
629
  class UpdateWebhookParameters(ExaBaseModel):
@@ -728,7 +728,7 @@ class WebhookAttempt(ExaBaseModel):
728
728
  """
729
729
  attempted_at: datetime = Field(..., alias='attemptedAt')
730
730
  """
731
- The date and time the webhook attempt was made
731
+ The date and time the attempt was made
732
732
  """
733
733
 
734
734
 
@@ -763,9 +763,9 @@ class Webset(ExaBaseModel):
763
763
  """
764
764
  The Enrichments to apply to the Webset Items.
765
765
  """
766
- streams: List[Stream]
766
+ monitors: List[Monitor]
767
767
  """
768
- The Streams for the Webset.
768
+ The Monitors for the Webset.
769
769
  """
770
770
  metadata: Optional[Dict[str, Any]] = {}
771
771
  """
@@ -777,7 +777,7 @@ class Webset(ExaBaseModel):
777
777
  """
778
778
  updated_at: datetime = Field(..., alias='updatedAt')
779
779
  """
780
- The date and time the webset was updated
780
+ The date and time the webset was last updated
781
781
  """
782
782
 
783
783
 
@@ -807,9 +807,7 @@ class WebsetCustomEntity(ExaBaseModel):
807
807
  type: Literal['custom']
808
808
  description: constr(min_length=2)
809
809
  """
810
- When you decide to use a custom entity, this is the description of the entity.
811
-
812
- The entity represents what type of results the Webset will return. For example, if you want results to be Job Postings, you might use "Job Postings" as the entity description.
810
+ The description of the custom entity
813
811
  """
814
812
 
815
813
 
@@ -877,7 +875,7 @@ class WebsetEnrichment(ExaBaseModel):
877
875
  """
878
876
  updated_at: datetime = Field(..., alias='updatedAt')
879
877
  """
880
- The date and time the enrichment was updated
878
+ The date and time the enrichment was last updated
881
879
  """
882
880
 
883
881
 
@@ -981,6 +979,9 @@ class WebsetItemArticleProperties(ExaBaseModel):
981
979
  article: WebsetItemArticlePropertiesFields = Field(
982
980
  ..., title='WebsetItemArticlePropertiesFields'
983
981
  )
982
+ """
983
+ The article fields
984
+ """
984
985
 
985
986
 
986
987
  class WebsetItemArticlePropertiesFields(ExaBaseModel):
@@ -990,7 +991,7 @@ class WebsetItemArticlePropertiesFields(ExaBaseModel):
990
991
  """
991
992
  published_at: Optional[str] = Field(None, alias='publishedAt')
992
993
  """
993
- The date and time the article was published
994
+ The date the article was published
994
995
  """
995
996
 
996
997
 
@@ -1011,6 +1012,9 @@ class WebsetItemCompanyProperties(ExaBaseModel):
1011
1012
  company: WebsetItemCompanyPropertiesFields = Field(
1012
1013
  ..., title='WebsetItemCompanyPropertiesFields'
1013
1014
  )
1015
+ """
1016
+ The company fields
1017
+ """
1014
1018
 
1015
1019
 
1016
1020
  class WebsetItemCompanyPropertiesFields(ExaBaseModel):
@@ -1036,7 +1040,7 @@ class WebsetItemCompanyPropertiesFields(ExaBaseModel):
1036
1040
  """
1037
1041
  logo_url: Optional[AnyUrl] = Field(None, alias='logoUrl')
1038
1042
  """
1039
- The logo URL of the company
1043
+ The URL of the company logo
1040
1044
  """
1041
1045
 
1042
1046
 
@@ -1071,6 +1075,9 @@ class WebsetItemCustomProperties(ExaBaseModel):
1071
1075
  custom: WebsetItemCustomPropertiesFields = Field(
1072
1076
  ..., title='WebsetItemCustomPropertiesFields'
1073
1077
  )
1078
+ """
1079
+ The custom fields
1080
+ """
1074
1081
 
1075
1082
 
1076
1083
  class WebsetItemCustomPropertiesFields(ExaBaseModel):
@@ -1080,9 +1087,10 @@ class WebsetItemCustomPropertiesFields(ExaBaseModel):
1080
1087
  """
1081
1088
  published_at: Optional[str] = Field(None, alias='publishedAt')
1082
1089
  """
1083
- The date and time the website was published
1090
+ The date the content was published
1084
1091
  """
1085
1092
 
1093
+
1086
1094
  class WebsetItemEnrichedEvent(ExaBaseModel):
1087
1095
  id: str
1088
1096
  """
@@ -1112,7 +1120,7 @@ class WebsetItemEvaluation(ExaBaseModel):
1112
1120
  """
1113
1121
  references: Optional[List[Reference]] = []
1114
1122
  """
1115
- The references used to generate the result.
1123
+ The references used to evaluate the criterion
1116
1124
  """
1117
1125
 
1118
1126
 
@@ -1129,6 +1137,9 @@ class WebsetItemPersonProperties(ExaBaseModel):
1129
1137
  person: WebsetItemPersonPropertiesFields = Field(
1130
1138
  ..., title='WebsetItemPersonPropertiesFields'
1131
1139
  )
1140
+ """
1141
+ The person fields
1142
+ """
1132
1143
 
1133
1144
 
1134
1145
  class WebsetItemPersonPropertiesFields(ExaBaseModel):
@@ -1146,7 +1157,7 @@ class WebsetItemPersonPropertiesFields(ExaBaseModel):
1146
1157
  """
1147
1158
  picture_url: Optional[AnyUrl] = Field(None, alias='pictureUrl')
1148
1159
  """
1149
- The image URL of the person
1160
+ The URL of the person's picture
1150
1161
  """
1151
1162
 
1152
1163
 
@@ -1165,8 +1176,11 @@ class WebsetItemResearchPaperProperties(ExaBaseModel):
1165
1176
  The text content of the research paper
1166
1177
  """
1167
1178
  research_paper: WebsetItemResearchPaperPropertiesFields = Field(
1168
- ..., alias='researchPaper', title='WebsetItemResearchPaperPropertiesFields'
1179
+ ..., title='WebsetItemResearchPaperPropertiesFields'
1169
1180
  )
1181
+ """
1182
+ The research paper fields
1183
+ """
1170
1184
 
1171
1185
 
1172
1186
  class WebsetItemResearchPaperPropertiesFields(ExaBaseModel):
@@ -1176,7 +1190,7 @@ class WebsetItemResearchPaperPropertiesFields(ExaBaseModel):
1176
1190
  """
1177
1191
  published_at: Optional[str] = Field(None, alias='publishedAt')
1178
1192
  """
1179
- The date and time the research paper was published
1193
+ The date the research paper was published
1180
1194
  """
1181
1195
 
1182
1196
 
@@ -1265,7 +1279,7 @@ class WebsetSearch(ExaBaseModel):
1265
1279
  """
1266
1280
  updated_at: datetime = Field(..., alias='updatedAt')
1267
1281
  """
1268
- The date and time the search was updated
1282
+ The date and time the search was last updated
1269
1283
  """
1270
1284
 
1271
1285
 
@@ -1365,5 +1379,5 @@ class WebsetStatus(Enum):
1365
1379
  class GetWebsetResponse(Webset):
1366
1380
  items: Optional[List[WebsetItem]] = None
1367
1381
  """
1368
- When expand query parameter contains `items`, this will contain the items in the webset
1382
+ The items in the webset
1369
1383
  """
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "exa-py"
3
- version = "1.14.1"
3
+ version = "1.14.2"
4
4
  description = "Python SDK for Exa API."
5
5
  authors = ["Exa AI <hello@exa.ai>"]
6
6
  readme = "README.md"
@@ -32,7 +32,7 @@ in-project = true
32
32
 
33
33
  [project]
34
34
  name = "exa-py"
35
- version = "1.14.1"
35
+ version = "1.14.2"
36
36
  description = "Python SDK for Exa API."
37
37
  readme = "README.md"
38
38
  requires-python = ">=3.9"
@@ -1,4 +0,0 @@
1
- from .client import StreamsClient
2
- from .runs import StreamRunsClient
3
-
4
- __all__ = ["StreamsClient", "StreamRunsClient"]
@@ -1,96 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from typing import Dict, Any, Union, Optional
4
-
5
- from ..types import (
6
- Stream,
7
- CreateStreamParameters,
8
- UpdateStream,
9
- ListStreamsResponse,
10
- )
11
- from ..core.base import WebsetsBaseClient
12
- from .runs import StreamRunsClient
13
-
14
- class StreamsClient(WebsetsBaseClient):
15
- """Client for managing Streams."""
16
-
17
- def __init__(self, client):
18
- super().__init__(client)
19
- self.runs = StreamRunsClient(client)
20
-
21
- def create(self, params: Union[Dict[str, Any], CreateStreamParameters]) -> Stream:
22
- """Create a new Stream to continuously keep your Websets updated with fresh data.
23
-
24
- Streams 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 (CreateStreamParameters): The parameters for creating a stream.
31
-
32
- Returns:
33
- Stream: The created stream.
34
- """
35
- response = self.request("/v0/streams", data=params)
36
- return Stream.model_validate(response)
37
-
38
- def get(self, stream_id: str) -> Stream:
39
- """Get a specific stream.
40
-
41
- Args:
42
- stream_id (str): The id of the Stream.
43
-
44
- Returns:
45
- Stream: The retrieved stream.
46
- """
47
- response = self.request(f"/v0/streams/{stream_id}", method="GET")
48
- return Stream.model_validate(response)
49
-
50
- def list(self, *, cursor: Optional[str] = None, limit: Optional[int] = None, webset_id: Optional[str] = None) -> ListStreamsResponse:
51
- """List all streams.
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 streams for.
57
-
58
- Returns:
59
- ListStreamsResponse: List of streams 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/streams", params=params, method="GET")
71
- return ListStreamsResponse.model_validate(response)
72
-
73
- def update(self, stream_id: str, params: Union[Dict[str, Any], UpdateStream]) -> Stream:
74
- """Update a stream configuration.
75
-
76
- Args:
77
- stream_id (str): The id of the Stream.
78
- params (UpdateStream): The parameters for updating a stream.
79
-
80
- Returns:
81
- Stream: The updated stream.
82
- """
83
- response = self.request(f"/v0/streams/{stream_id}", data=params, method="PATCH")
84
- return Stream.model_validate(response)
85
-
86
- def delete(self, stream_id: str) -> Stream:
87
- """Delete a stream.
88
-
89
- Args:
90
- stream_id (str): The id of the Stream.
91
-
92
- Returns:
93
- Stream: The deleted stream.
94
- """
95
- response = self.request(f"/v0/streams/{stream_id}", method="DELETE")
96
- return Stream.model_validate(response)
@@ -1,3 +0,0 @@
1
- from .client import StreamRunsClient
2
-
3
- __all__ = ["StreamRunsClient"]
@@ -1,38 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from ...types import (
4
- StreamRun,
5
- ListStreamRunsResponse,
6
- )
7
- from ...core.base import WebsetsBaseClient
8
-
9
- class StreamRunsClient(WebsetsBaseClient):
10
- """Client for managing Stream Runs."""
11
-
12
- def __init__(self, client):
13
- super().__init__(client)
14
-
15
- def list(self, stream_id: str) -> ListStreamRunsResponse:
16
- """List all runs for the Stream.
17
-
18
- Args:
19
- stream_id (str): The id of the Stream to list runs for.
20
-
21
- Returns:
22
- ListStreamRunsResponse: List of stream runs.
23
- """
24
- response = self.request(f"/v0/streams/{stream_id}/runs", method="GET")
25
- return ListStreamRunsResponse.model_validate(response)
26
-
27
- def get(self, stream_id: str, run_id: str) -> StreamRun:
28
- """Get a specific stream run.
29
-
30
- Args:
31
- stream_id (str): The id of the Stream to get the run for.
32
- run_id (str): The id of the stream run.
33
-
34
- Returns:
35
- StreamRun: The stream run details.
36
- """
37
- response = self.request(f"/v0/streams/{stream_id}/runs/{run_id}", method="GET")
38
- return StreamRun.model_validate(response)
File without changes
File without changes
File without changes
File without changes
File without changes