exa-py 1.15.0__py3-none-any.whl → 1.15.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/websets/enrichments/client.py +15 -0
- exa_py/websets/events/client.py +21 -0
- exa_py/websets/types.py +138 -3
- {exa_py-1.15.0.dist-info → exa_py-1.15.1.dist-info}/METADATA +1 -1
- {exa_py-1.15.0.dist-info → exa_py-1.15.1.dist-info}/RECORD +6 -6
- {exa_py-1.15.0.dist-info → exa_py-1.15.1.dist-info}/WHEEL +0 -0
|
@@ -4,6 +4,7 @@ from typing import Dict, Any, Union
|
|
|
4
4
|
|
|
5
5
|
from ..types import (
|
|
6
6
|
CreateEnrichmentParameters,
|
|
7
|
+
UpdateEnrichmentParameters,
|
|
7
8
|
WebsetEnrichment,
|
|
8
9
|
)
|
|
9
10
|
from ..core.base import WebsetsBaseClient
|
|
@@ -40,6 +41,20 @@ class WebsetEnrichmentsClient(WebsetsBaseClient):
|
|
|
40
41
|
response = self.request(f"/v0/websets/{webset_id}/enrichments/{id}", method="GET")
|
|
41
42
|
return WebsetEnrichment.model_validate(response)
|
|
42
43
|
|
|
44
|
+
def update(self, webset_id: str, id: str, params: Union[Dict[str, Any], UpdateEnrichmentParameters]) -> WebsetEnrichment:
|
|
45
|
+
"""Update an Enrichment.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
webset_id (str): The id of the Webset.
|
|
49
|
+
id (str): The id of the Enrichment.
|
|
50
|
+
params (UpdateEnrichmentParameters): The parameters for updating an enrichment.
|
|
51
|
+
|
|
52
|
+
Returns:
|
|
53
|
+
WebsetEnrichment: The updated enrichment.
|
|
54
|
+
"""
|
|
55
|
+
response = self.request(f"/v0/websets/{webset_id}/enrichments/{id}", data=params, method="PATCH")
|
|
56
|
+
return WebsetEnrichment.model_validate(response)
|
|
57
|
+
|
|
43
58
|
def delete(self, webset_id: str, id: str) -> WebsetEnrichment:
|
|
44
59
|
"""Delete an Enrichment.
|
|
45
60
|
|
exa_py/websets/events/client.py
CHANGED
|
@@ -15,6 +15,13 @@ from ..types import (
|
|
|
15
15
|
WebsetSearchUpdatedEvent,
|
|
16
16
|
WebsetSearchCanceledEvent,
|
|
17
17
|
WebsetSearchCompletedEvent,
|
|
18
|
+
ImportCreatedEvent,
|
|
19
|
+
ImportCompletedEvent,
|
|
20
|
+
MonitorCreatedEvent,
|
|
21
|
+
MonitorUpdatedEvent,
|
|
22
|
+
MonitorDeletedEvent,
|
|
23
|
+
MonitorRunCreatedEvent,
|
|
24
|
+
MonitorRunCompletedEvent,
|
|
18
25
|
)
|
|
19
26
|
from ..core.base import WebsetsBaseClient
|
|
20
27
|
|
|
@@ -30,6 +37,13 @@ Event = Union[
|
|
|
30
37
|
WebsetSearchUpdatedEvent,
|
|
31
38
|
WebsetSearchCanceledEvent,
|
|
32
39
|
WebsetSearchCompletedEvent,
|
|
40
|
+
ImportCreatedEvent,
|
|
41
|
+
ImportCompletedEvent,
|
|
42
|
+
MonitorCreatedEvent,
|
|
43
|
+
MonitorUpdatedEvent,
|
|
44
|
+
MonitorDeletedEvent,
|
|
45
|
+
MonitorRunCreatedEvent,
|
|
46
|
+
MonitorRunCompletedEvent,
|
|
33
47
|
]
|
|
34
48
|
|
|
35
49
|
class EventsClient(WebsetsBaseClient):
|
|
@@ -89,6 +103,13 @@ class EventsClient(WebsetsBaseClient):
|
|
|
89
103
|
'webset.search.updated': WebsetSearchUpdatedEvent,
|
|
90
104
|
'webset.search.canceled': WebsetSearchCanceledEvent,
|
|
91
105
|
'webset.search.completed': WebsetSearchCompletedEvent,
|
|
106
|
+
'import.created': ImportCreatedEvent,
|
|
107
|
+
'import.completed': ImportCompletedEvent,
|
|
108
|
+
'monitor.created': MonitorCreatedEvent,
|
|
109
|
+
'monitor.updated': MonitorUpdatedEvent,
|
|
110
|
+
'monitor.deleted': MonitorDeletedEvent,
|
|
111
|
+
'monitor.run.created': MonitorRunCreatedEvent,
|
|
112
|
+
'monitor.run.completed': MonitorRunCompletedEvent,
|
|
92
113
|
}
|
|
93
114
|
|
|
94
115
|
event_class = event_type_map.get(event_type)
|
exa_py/websets/types.py
CHANGED
|
@@ -243,11 +243,15 @@ class EventType(Enum):
|
|
|
243
243
|
webset_search_updated = 'webset.search.updated'
|
|
244
244
|
import_created = 'import.created'
|
|
245
245
|
import_completed = 'import.completed'
|
|
246
|
-
import_processing = 'import.processing'
|
|
247
|
-
webset_export_created = 'webset.export.created'
|
|
248
|
-
webset_export_completed = 'webset.export.completed'
|
|
249
246
|
webset_item_created = 'webset.item.created'
|
|
250
247
|
webset_item_enriched = 'webset.item.enriched'
|
|
248
|
+
monitor_created = 'monitor.created'
|
|
249
|
+
monitor_updated = 'monitor.updated'
|
|
250
|
+
monitor_deleted = 'monitor.deleted'
|
|
251
|
+
monitor_run_created = 'monitor.run.created'
|
|
252
|
+
monitor_run_completed = 'monitor.run.completed'
|
|
253
|
+
webset_export_created = 'webset.export.created'
|
|
254
|
+
webset_export_completed = 'webset.export.completed'
|
|
251
255
|
|
|
252
256
|
|
|
253
257
|
class Format(Enum):
|
|
@@ -263,6 +267,7 @@ class Format(Enum):
|
|
|
263
267
|
options = 'options'
|
|
264
268
|
email = 'email'
|
|
265
269
|
phone = 'phone'
|
|
270
|
+
url = 'url'
|
|
266
271
|
|
|
267
272
|
|
|
268
273
|
class ImportFormat(Enum):
|
|
@@ -333,6 +338,13 @@ class ListEventsResponse(ExaBaseModel):
|
|
|
333
338
|
WebsetSearchUpdatedEvent,
|
|
334
339
|
WebsetSearchCanceledEvent,
|
|
335
340
|
WebsetSearchCompletedEvent,
|
|
341
|
+
ImportCreatedEvent,
|
|
342
|
+
ImportCompletedEvent,
|
|
343
|
+
MonitorCreatedEvent,
|
|
344
|
+
MonitorUpdatedEvent,
|
|
345
|
+
MonitorDeletedEvent,
|
|
346
|
+
MonitorRunCreatedEvent,
|
|
347
|
+
MonitorRunCompletedEvent,
|
|
336
348
|
],
|
|
337
349
|
Field(discriminator='type')
|
|
338
350
|
]]
|
|
@@ -802,6 +814,30 @@ class UpdateImport(ExaBaseModel):
|
|
|
802
814
|
"""
|
|
803
815
|
|
|
804
816
|
|
|
817
|
+
class UpdateEnrichmentParameters(ExaBaseModel):
|
|
818
|
+
"""
|
|
819
|
+
Parameters for updating an enrichment.
|
|
820
|
+
"""
|
|
821
|
+
description: Optional[str] = None
|
|
822
|
+
"""
|
|
823
|
+
Provide a description of the enrichment task you want to perform to each Webset Item.
|
|
824
|
+
"""
|
|
825
|
+
format: Optional[Format] = None
|
|
826
|
+
"""
|
|
827
|
+
Format of the enrichment response.
|
|
828
|
+
|
|
829
|
+
We automatically select the best format based on the description. If you want to explicitly specify the format, you can do so here.
|
|
830
|
+
"""
|
|
831
|
+
options: Optional[List[Option]] = None
|
|
832
|
+
"""
|
|
833
|
+
When the format is options, the different options for the enrichment agent to choose from.
|
|
834
|
+
"""
|
|
835
|
+
metadata: Optional[Dict[str, Any]] = None
|
|
836
|
+
"""
|
|
837
|
+
Set of key-value pairs you want to associate with this object.
|
|
838
|
+
"""
|
|
839
|
+
|
|
840
|
+
|
|
805
841
|
class Option(ExaBaseModel):
|
|
806
842
|
label: str
|
|
807
843
|
"""
|
|
@@ -1336,6 +1372,7 @@ class WebsetEnrichmentFormat(Enum):
|
|
|
1336
1372
|
options = 'options'
|
|
1337
1373
|
email = 'email'
|
|
1338
1374
|
phone = 'phone'
|
|
1375
|
+
url = 'url'
|
|
1339
1376
|
|
|
1340
1377
|
|
|
1341
1378
|
class WebsetEnrichmentOption(Option):
|
|
@@ -1873,6 +1910,104 @@ class WebsetSearchUpdatedEvent(ExaBaseModel):
|
|
|
1873
1910
|
"""
|
|
1874
1911
|
|
|
1875
1912
|
|
|
1913
|
+
class ImportCreatedEvent(ExaBaseModel):
|
|
1914
|
+
id: str
|
|
1915
|
+
"""
|
|
1916
|
+
The unique identifier for the event
|
|
1917
|
+
"""
|
|
1918
|
+
object: Literal['event']
|
|
1919
|
+
type: Literal['import.created']
|
|
1920
|
+
data: Import
|
|
1921
|
+
created_at: datetime = Field(..., alias='createdAt')
|
|
1922
|
+
"""
|
|
1923
|
+
The date and time the event was created
|
|
1924
|
+
"""
|
|
1925
|
+
|
|
1926
|
+
|
|
1927
|
+
class ImportCompletedEvent(ExaBaseModel):
|
|
1928
|
+
id: str
|
|
1929
|
+
"""
|
|
1930
|
+
The unique identifier for the event
|
|
1931
|
+
"""
|
|
1932
|
+
object: Literal['event']
|
|
1933
|
+
type: Literal['import.completed']
|
|
1934
|
+
data: Import
|
|
1935
|
+
created_at: datetime = Field(..., alias='createdAt')
|
|
1936
|
+
"""
|
|
1937
|
+
The date and time the event was created
|
|
1938
|
+
"""
|
|
1939
|
+
|
|
1940
|
+
|
|
1941
|
+
class MonitorCreatedEvent(ExaBaseModel):
|
|
1942
|
+
id: str
|
|
1943
|
+
"""
|
|
1944
|
+
The unique identifier for the event
|
|
1945
|
+
"""
|
|
1946
|
+
object: Literal['event']
|
|
1947
|
+
type: Literal['monitor.created']
|
|
1948
|
+
data: Monitor
|
|
1949
|
+
created_at: datetime = Field(..., alias='createdAt')
|
|
1950
|
+
"""
|
|
1951
|
+
The date and time the event was created
|
|
1952
|
+
"""
|
|
1953
|
+
|
|
1954
|
+
|
|
1955
|
+
class MonitorUpdatedEvent(ExaBaseModel):
|
|
1956
|
+
id: str
|
|
1957
|
+
"""
|
|
1958
|
+
The unique identifier for the event
|
|
1959
|
+
"""
|
|
1960
|
+
object: Literal['event']
|
|
1961
|
+
type: Literal['monitor.updated']
|
|
1962
|
+
data: Monitor
|
|
1963
|
+
created_at: datetime = Field(..., alias='createdAt')
|
|
1964
|
+
"""
|
|
1965
|
+
The date and time the event was created
|
|
1966
|
+
"""
|
|
1967
|
+
|
|
1968
|
+
|
|
1969
|
+
class MonitorDeletedEvent(ExaBaseModel):
|
|
1970
|
+
id: str
|
|
1971
|
+
"""
|
|
1972
|
+
The unique identifier for the event
|
|
1973
|
+
"""
|
|
1974
|
+
object: Literal['event']
|
|
1975
|
+
type: Literal['monitor.deleted']
|
|
1976
|
+
data: Monitor
|
|
1977
|
+
created_at: datetime = Field(..., alias='createdAt')
|
|
1978
|
+
"""
|
|
1979
|
+
The date and time the event was created
|
|
1980
|
+
"""
|
|
1981
|
+
|
|
1982
|
+
|
|
1983
|
+
class MonitorRunCreatedEvent(ExaBaseModel):
|
|
1984
|
+
id: str
|
|
1985
|
+
"""
|
|
1986
|
+
The unique identifier for the event
|
|
1987
|
+
"""
|
|
1988
|
+
object: Literal['event']
|
|
1989
|
+
type: Literal['monitor.run.created']
|
|
1990
|
+
data: MonitorRun
|
|
1991
|
+
created_at: datetime = Field(..., alias='createdAt')
|
|
1992
|
+
"""
|
|
1993
|
+
The date and time the event was created
|
|
1994
|
+
"""
|
|
1995
|
+
|
|
1996
|
+
|
|
1997
|
+
class MonitorRunCompletedEvent(ExaBaseModel):
|
|
1998
|
+
id: str
|
|
1999
|
+
"""
|
|
2000
|
+
The unique identifier for the event
|
|
2001
|
+
"""
|
|
2002
|
+
object: Literal['event']
|
|
2003
|
+
type: Literal['monitor.run.completed']
|
|
2004
|
+
data: MonitorRun
|
|
2005
|
+
created_at: datetime = Field(..., alias='createdAt')
|
|
2006
|
+
"""
|
|
2007
|
+
The date and time the event was created
|
|
2008
|
+
"""
|
|
2009
|
+
|
|
2010
|
+
|
|
1876
2011
|
class WebsetStatus(Enum):
|
|
1877
2012
|
"""
|
|
1878
2013
|
The status of the webset
|
|
@@ -14,9 +14,9 @@ exa_py/websets/client.py,sha256=sKkji8QaPFnGM1-J5TB6yKJcGAEd6gk7lsnIebzXNQ8,5856
|
|
|
14
14
|
exa_py/websets/core/__init__.py,sha256=xOyrFaqtBocMUu321Jpbk7IzIQRNZufSIGJXrKoG-Bg,323
|
|
15
15
|
exa_py/websets/core/base.py,sha256=RldWYwBg2iVfkWmdPke7xjXdwb4JKeABIOgiZtqvz-4,4125
|
|
16
16
|
exa_py/websets/enrichments/__init__.py,sha256=5dJIEKKceUost3RnI6PpCSB3VjUCBzxseEsIXu-ZY-Y,83
|
|
17
|
-
exa_py/websets/enrichments/client.py,sha256=
|
|
17
|
+
exa_py/websets/enrichments/client.py,sha256=Qn6B19Gf1z4pQ5CCeXMFeTJnVi2OiVx9Ck5XlcQBZVI,2999
|
|
18
18
|
exa_py/websets/events/__init__.py,sha256=aFJ9O5UudtQQzndVmdB96IaM2l07qyM1B_8xKY7rp58,60
|
|
19
|
-
exa_py/websets/events/client.py,sha256
|
|
19
|
+
exa_py/websets/events/client.py,sha256=-7sQ61P0SdHj-LuYq6G0u9a_IrtmcCljyDCzZPf330U,4370
|
|
20
20
|
exa_py/websets/imports/__init__.py,sha256=iEl-fZZSdcvKaqLgjMES_0RwYn7hZDCMf6BZriCrjgw,64
|
|
21
21
|
exa_py/websets/imports/client.py,sha256=nJs46hxlSkZm7qjboYHNBuJ62gLmA_Yzr9fc-NDky0Y,6795
|
|
22
22
|
exa_py/websets/items/__init__.py,sha256=DCWZJVtRmUjnMEkKdb5gW1LT9cHcb-J8lENMnyyBeKU,71
|
|
@@ -27,9 +27,9 @@ exa_py/websets/monitors/runs/__init__.py,sha256=TmcETf3zdQouA_vAeLiosCNL1MYJnZ0y
|
|
|
27
27
|
exa_py/websets/monitors/runs/client.py,sha256=WnwcWCf7UKk68VCNUp8mRXBtlU8vglTSX-eoWVXzKIw,1229
|
|
28
28
|
exa_py/websets/searches/__init__.py,sha256=_0Zx8ES5fFTEL3T8mhLxq_xK2t0JONx6ad6AtbvClsE,77
|
|
29
29
|
exa_py/websets/searches/client.py,sha256=X3f7axWGfecmxf-2tBTX0Yf_--xToz1X8ZHbbudEzy0,1790
|
|
30
|
-
exa_py/websets/types.py,sha256=
|
|
30
|
+
exa_py/websets/types.py,sha256=iDZqvt22hjhkU8_AIczQ9iHexUw9C4PHh7C66ujfhk4,50523
|
|
31
31
|
exa_py/websets/webhooks/__init__.py,sha256=iTPBCxFd73z4RifLQMX6iRECx_6pwlI5qscLNjMOUHE,77
|
|
32
32
|
exa_py/websets/webhooks/client.py,sha256=zS1eoWKliuiY4AIeFJdpAlPZeOINyphn7KEWANF-zaE,4384
|
|
33
|
-
exa_py-1.15.
|
|
34
|
-
exa_py-1.15.
|
|
35
|
-
exa_py-1.15.
|
|
33
|
+
exa_py-1.15.1.dist-info/METADATA,sha256=6MtMgPdsfzWgOKeQtywu4aZASbZjYpetbiirn17CzjE,3826
|
|
34
|
+
exa_py-1.15.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
35
|
+
exa_py-1.15.1.dist-info/RECORD,,
|
|
File without changes
|