exa-py 1.14.12__tar.gz → 1.14.14__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.
- {exa_py-1.14.12 → exa_py-1.14.14}/PKG-INFO +18 -16
- {exa_py-1.14.12 → exa_py-1.14.14}/README.md +1 -4
- exa_py-1.14.14/exa_py/websets/_generator/pydantic/BaseModel.jinja2 +42 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/core/base.py +3 -3
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/types.py +123 -126
- {exa_py-1.14.12 → exa_py-1.14.14}/pyproject.toml +1 -1
- exa_py-1.14.12/exa_py.egg-info/PKG-INFO +0 -128
- exa_py-1.14.12/exa_py.egg-info/SOURCES.txt +0 -41
- exa_py-1.14.12/exa_py.egg-info/dependency_links.txt +0 -1
- exa_py-1.14.12/exa_py.egg-info/requires.txt +0 -5
- exa_py-1.14.12/exa_py.egg-info/top_level.txt +0 -1
- exa_py-1.14.12/setup.cfg +0 -4
- exa_py-1.14.12/setup.py +0 -26
- exa_py-1.14.12/tests/test_search_api.py +0 -136
- exa_py-1.14.12/tests/test_websets.py +0 -418
- exa_py-1.14.12/tests/test_websets_events.py +0 -416
- exa_py-1.14.12/tests/test_websets_imports.py +0 -439
- exa_py-1.14.12/tests/test_websets_monitors.py +0 -502
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/__init__.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/api.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/py.typed +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/research/__init__.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/research/client.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/research/models.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/utils.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/__init__.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/client.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/core/__init__.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/enrichments/__init__.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/enrichments/client.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/events/__init__.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/events/client.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/imports/__init__.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/imports/client.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/items/__init__.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/items/client.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/monitors/__init__.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/monitors/client.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/monitors/runs/__init__.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/monitors/runs/client.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/searches/__init__.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/searches/client.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/webhooks/__init__.py +0 -0
- {exa_py-1.14.12 → exa_py-1.14.14}/exa_py/websets/webhooks/client.py +0 -0
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: exa-py
|
|
3
|
-
Version: 1.14.
|
|
3
|
+
Version: 1.14.14
|
|
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>
|
|
8
5
|
License: MIT
|
|
6
|
+
Author: Exa AI
|
|
7
|
+
Author-email: hello@exa.ai
|
|
9
8
|
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: requests (>=2.32.3)
|
|
20
|
+
Requires-Dist: typing-extensions (>=4.12.2)
|
|
10
21
|
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: httpx>=0.28.1
|
|
16
|
-
Dynamic: author
|
|
17
|
-
Dynamic: home-page
|
|
18
22
|
|
|
19
23
|
# Exa
|
|
20
24
|
|
|
21
|
-
Exa
|
|
22
|
-
|
|
23
|
-
Note: This API is basically the same as `metaphor-python` but reflects new
|
|
24
|
-
features associated with Metaphor's rename to Exa. New site is https://exa.ai
|
|
25
|
+
Exa API in Python
|
|
25
26
|
|
|
26
27
|
## Installation
|
|
27
28
|
|
|
@@ -126,3 +127,4 @@ exa = Exa(api_key="your-api-key")
|
|
|
126
127
|
output_schema=OUTPUT_SCHEMA,
|
|
127
128
|
)
|
|
128
129
|
```
|
|
130
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{% for decorator in decorators -%}
|
|
2
|
+
{{ decorator }}
|
|
3
|
+
{% endfor -%}
|
|
4
|
+
class {{ class_name }}({{ base_class }}):{% if comment is defined %} # {{ comment }}{% endif %}
|
|
5
|
+
{%- if description %}
|
|
6
|
+
"""
|
|
7
|
+
{{ description | indent(4) }}
|
|
8
|
+
"""
|
|
9
|
+
{%- endif %}
|
|
10
|
+
{%- if not fields and not description %}
|
|
11
|
+
pass
|
|
12
|
+
{%- endif %}
|
|
13
|
+
{%- if config %}
|
|
14
|
+
{%- filter indent(4) %}
|
|
15
|
+
{%- endfilter %}
|
|
16
|
+
{%- endif %}
|
|
17
|
+
{%- for field in fields -%}
|
|
18
|
+
{%- if field.name == "type" and field.field %}
|
|
19
|
+
type: Literal['{{ field.default }}']
|
|
20
|
+
{%- elif field.name == "object" and field.field %}
|
|
21
|
+
object: Literal['{{ field.default }}']
|
|
22
|
+
{%- elif not field.annotated and field.field %}
|
|
23
|
+
{{ field.name }}: {{ field.type_hint }} = {{ field.field }}
|
|
24
|
+
{%- else %}
|
|
25
|
+
{%- if field.annotated %}
|
|
26
|
+
{{ field.name }}: {{ field.annotated }}
|
|
27
|
+
{%- else %}
|
|
28
|
+
{{ field.name }}: {{ field.type_hint }}
|
|
29
|
+
{%- endif %}
|
|
30
|
+
{%- if not (field.required or (field.represented_default == 'None' and field.strip_default_none)) or field.data_type.is_optional
|
|
31
|
+
%} = {{ field.represented_default }}
|
|
32
|
+
{%- endif -%}
|
|
33
|
+
{%- endif %}
|
|
34
|
+
{%- if field.docstring %}
|
|
35
|
+
"""
|
|
36
|
+
{{ field.docstring | indent(4) }}
|
|
37
|
+
"""
|
|
38
|
+
{%- endif %}
|
|
39
|
+
{%- for method in methods -%}
|
|
40
|
+
{{ method }}
|
|
41
|
+
{%- endfor -%}
|
|
42
|
+
{%- endfor -%}
|
|
@@ -62,10 +62,10 @@ class WebsetsBaseClient:
|
|
|
62
62
|
elif isinstance(data, dict) and model_class:
|
|
63
63
|
# Convert dict to model instance
|
|
64
64
|
model_instance = model_class.model_validate(data)
|
|
65
|
-
return model_instance.model_dump(by_alias=True, exclude_none=True)
|
|
65
|
+
return model_instance.model_dump(mode='json', by_alias=True, exclude_none=True)
|
|
66
66
|
elif isinstance(data, ExaBaseModel):
|
|
67
67
|
# Use model's dump method
|
|
68
|
-
return data.model_dump(by_alias=True, exclude_none=True)
|
|
68
|
+
return data.model_dump(mode='json', by_alias=True, exclude_none=True)
|
|
69
69
|
elif isinstance(data, dict):
|
|
70
70
|
# Use dict directly
|
|
71
71
|
return data
|
|
@@ -90,7 +90,7 @@ class WebsetsBaseClient:
|
|
|
90
90
|
pass
|
|
91
91
|
elif data is not None and isinstance(data, ExaBaseModel):
|
|
92
92
|
# If data is a model instance, convert it to a dict
|
|
93
|
-
data = data.model_dump(by_alias=True, exclude_none=True)
|
|
93
|
+
data = data.model_dump(mode='json', by_alias=True, exclude_none=True)
|
|
94
94
|
|
|
95
95
|
# Ensure proper URL construction by removing leading slash from endpoint if present
|
|
96
96
|
if endpoint.startswith("/"):
|