ateve 0.2.1__tar.gz → 0.2.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.
- {ateve-0.2.1 → ateve-0.2.2}/PKG-INFO +29 -21
- {ateve-0.2.1 → ateve-0.2.2}/README.md +28 -20
- {ateve-0.2.1 → ateve-0.2.2}/pyproject.toml +1 -1
- ateve-0.2.2/src/ateve/_version.py +1 -0
- {ateve-0.2.1 → ateve-0.2.2}/src/ateve/models.py +0 -1
- {ateve-0.2.1 → ateve-0.2.2}/tests/test_client.py +6 -6
- {ateve-0.2.1 → ateve-0.2.2}/tests/test_models.py +3 -5
- ateve-0.2.1/src/ateve/_version.py +0 -1
- {ateve-0.2.1 → ateve-0.2.2}/.generated-models.json +0 -0
- {ateve-0.2.1 → ateve-0.2.2}/.gitignore +0 -0
- {ateve-0.2.1 → ateve-0.2.2}/.turbo/turbo-build.log +0 -0
- {ateve-0.2.1 → ateve-0.2.2}/.turbo/turbo-check.log +0 -0
- {ateve-0.2.1 → ateve-0.2.2}/src/ateve/__init__.py +0 -0
- {ateve-0.2.1 → ateve-0.2.2}/src/ateve/_model_exports.py +0 -0
- {ateve-0.2.1 → ateve-0.2.2}/src/ateve/client.py +0 -0
- {ateve-0.2.1 → ateve-0.2.2}/src/ateve/errors.py +0 -0
- {ateve-0.2.1 → ateve-0.2.2}/src/ateve/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: ateve
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Official Python SDK for the Ateve Search API
|
|
5
5
|
Project-URL: Homepage, https://ateve.ai
|
|
6
6
|
Project-URL: Documentation, https://ateve.ai/docs
|
|
@@ -81,24 +81,32 @@ decisions remain caller-owned.
|
|
|
81
81
|
|
|
82
82
|
## Search contract limits
|
|
83
83
|
|
|
84
|
-
Use `max_results` (1–100, default 10)
|
|
85
|
-
`
|
|
86
|
-
|
|
84
|
+
Use `max_results` to set the maximum number of results (1–100, default 10).
|
|
85
|
+
`limit` and `offset` have been removed. Both synchronous and asynchronous
|
|
86
|
+
clients accept `content` and `max_results`, or a `SearchRequest` instance.
|
|
87
|
+
|
|
88
|
+
Snippets are always returned and cannot be disabled. To request full text, pass
|
|
89
|
+
`content=ContentOptions(text=TextOptions())`. To customize the output, use
|
|
87
90
|
`TextOptions(max_characters=8000, format=ContentFormat.MARKDOWN)`.
|
|
88
|
-
`format` accepts `
|
|
89
|
-
|
|
90
|
-
integer
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
91
|
+
`format` accepts `ContentFormat.TEXT` (default) or `ContentFormat.MARKDOWN`.
|
|
92
|
+
Full text is requested only when `text` is supplied. `max_characters` must be a
|
|
93
|
+
strict positive signed 32-bit integer. The server default is 5,000 characters
|
|
94
|
+
per result, applied after format conversion. Both formats return content in
|
|
95
|
+
`SearchResult.text`, which is `None` when absent or when extraction fails.
|
|
96
|
+
`model_fields_set` distinguishes those cases. Full text is returned alongside
|
|
97
|
+
snippets.
|
|
98
|
+
|
|
99
|
+
Highlights are optional and disabled by default. Set
|
|
100
|
+
`content=ContentOptions(highlights=True)` to return concise, query-relevant
|
|
101
|
+
excerpts in addition to snippets. `SearchResult.highlights` is a `list[str]`, or
|
|
102
|
+
`None` when the field is absent. Highlights can coexist with snippets and full text.
|
|
103
|
+
|
|
104
|
+
For token-efficient workflows, your agent can prioritize highlights when building
|
|
105
|
+
model context and supplement them with snippets when additional context is needed.
|
|
106
|
+
When the API returns both fields, token savings depend on which content your
|
|
107
|
+
agent passes to the model.
|
|
108
|
+
|
|
109
|
+
`summary` and the snippet toggle have been removed from `ContentOptions`.
|
|
110
|
+
`favicon` remains optional under `content`. Obsolete answer, usage, news/video,
|
|
111
|
+
query tuning, and raw content/summary response fields and models have been removed.
|
|
112
|
+
Unknown response fields continue to be retained by Pydantic for forward compatibility.
|
|
@@ -55,24 +55,32 @@ decisions remain caller-owned.
|
|
|
55
55
|
|
|
56
56
|
## Search contract limits
|
|
57
57
|
|
|
58
|
-
Use `max_results` (1–100, default 10)
|
|
59
|
-
`
|
|
60
|
-
|
|
58
|
+
Use `max_results` to set the maximum number of results (1–100, default 10).
|
|
59
|
+
`limit` and `offset` have been removed. Both synchronous and asynchronous
|
|
60
|
+
clients accept `content` and `max_results`, or a `SearchRequest` instance.
|
|
61
|
+
|
|
62
|
+
Snippets are always returned and cannot be disabled. To request full text, pass
|
|
63
|
+
`content=ContentOptions(text=TextOptions())`. To customize the output, use
|
|
61
64
|
`TextOptions(max_characters=8000, format=ContentFormat.MARKDOWN)`.
|
|
62
|
-
`format` accepts `
|
|
63
|
-
|
|
64
|
-
integer
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
65
|
+
`format` accepts `ContentFormat.TEXT` (default) or `ContentFormat.MARKDOWN`.
|
|
66
|
+
Full text is requested only when `text` is supplied. `max_characters` must be a
|
|
67
|
+
strict positive signed 32-bit integer. The server default is 5,000 characters
|
|
68
|
+
per result, applied after format conversion. Both formats return content in
|
|
69
|
+
`SearchResult.text`, which is `None` when absent or when extraction fails.
|
|
70
|
+
`model_fields_set` distinguishes those cases. Full text is returned alongside
|
|
71
|
+
snippets.
|
|
72
|
+
|
|
73
|
+
Highlights are optional and disabled by default. Set
|
|
74
|
+
`content=ContentOptions(highlights=True)` to return concise, query-relevant
|
|
75
|
+
excerpts in addition to snippets. `SearchResult.highlights` is a `list[str]`, or
|
|
76
|
+
`None` when the field is absent. Highlights can coexist with snippets and full text.
|
|
77
|
+
|
|
78
|
+
For token-efficient workflows, your agent can prioritize highlights when building
|
|
79
|
+
model context and supplement them with snippets when additional context is needed.
|
|
80
|
+
When the API returns both fields, token savings depend on which content your
|
|
81
|
+
agent passes to the model.
|
|
82
|
+
|
|
83
|
+
`summary` and the snippet toggle have been removed from `ContentOptions`.
|
|
84
|
+
`favicon` remains optional under `content`. Obsolete answer, usage, news/video,
|
|
85
|
+
query tuning, and raw content/summary response fields and models have been removed.
|
|
86
|
+
Unknown response fields continue to be retained by Pydantic for forward compatibility.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.2"
|
|
@@ -57,7 +57,7 @@ def test_sync_golden_contract_and_wire_names() -> None:
|
|
|
57
57
|
date_range="2026-01-01..2026-06-30",
|
|
58
58
|
locale=LocaleSettings(mkt="US", language="en"),
|
|
59
59
|
content=ContentOptions(
|
|
60
|
-
|
|
60
|
+
highlights=True,
|
|
61
61
|
text=TextOptions(format=ContentFormat.MARKDOWN, max_characters=5000)
|
|
62
62
|
),
|
|
63
63
|
safe_search=False,
|
|
@@ -67,7 +67,7 @@ def test_sync_golden_contract_and_wire_names() -> None:
|
|
|
67
67
|
assert payload["date_range"] == "2026-01-01..2026-06-30"
|
|
68
68
|
assert payload["safe_search"] is False
|
|
69
69
|
assert payload["max_results"] == 20
|
|
70
|
-
assert payload["content"]
|
|
70
|
+
assert "snippet" not in payload["content"]
|
|
71
71
|
assert payload["content"]["highlights"] is True
|
|
72
72
|
assert not {"limit", "offset", "contents"}.intersection(payload)
|
|
73
73
|
assert payload["content"]["text"]["max_characters"] == 5000
|
|
@@ -345,7 +345,7 @@ def test_sync_and_async_send_new_defaults_and_nested_text_options() -> None:
|
|
|
345
345
|
AsyncAteve("sk_test", http_client=transport) as client,
|
|
346
346
|
):
|
|
347
347
|
response = await client.search(
|
|
348
|
-
"q", max_results=100, content=ContentOptions(
|
|
348
|
+
"q", max_results=100, content=ContentOptions(highlights=True)
|
|
349
349
|
)
|
|
350
350
|
assert response.results[0].highlights == GOLDEN_RESPONSE["results"][0]["highlights"]
|
|
351
351
|
await client.search(
|
|
@@ -358,12 +358,12 @@ def test_sync_and_async_send_new_defaults_and_nested_text_options() -> None:
|
|
|
358
358
|
{
|
|
359
359
|
"query": "q",
|
|
360
360
|
"max_results": 10,
|
|
361
|
-
"content": {"
|
|
361
|
+
"content": {"highlights": False, "text": {"format": "text"}},
|
|
362
362
|
},
|
|
363
|
-
{"query": "q", "max_results": 100, "content": {"
|
|
363
|
+
{"query": "q", "max_results": 100, "content": {"highlights": True}},
|
|
364
364
|
{
|
|
365
365
|
"query": "q",
|
|
366
366
|
"max_results": 10,
|
|
367
|
-
"content": {"
|
|
367
|
+
"content": {"highlights": False, "text": {"format": "text"}},
|
|
368
368
|
},
|
|
369
369
|
]
|
|
@@ -25,6 +25,8 @@ def test_request_models_preserve_validation_and_frozen_configuration() -> None:
|
|
|
25
25
|
request.query = "changed"
|
|
26
26
|
with pytest.raises(ValidationError):
|
|
27
27
|
TextOptions(max_characters=True)
|
|
28
|
+
with pytest.raises(ValidationError, match="snippet"):
|
|
29
|
+
ContentOptions.model_validate({"snippet": False})
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
def test_response_models_preserve_defaults_nulls_extra_fields_and_dates() -> None:
|
|
@@ -54,7 +56,6 @@ def test_request_lists_are_snapshots_and_wire_names_stay_snake_case() -> None:
|
|
|
54
56
|
|
|
55
57
|
def test_request_defaults_and_nested_text_activation() -> None:
|
|
56
58
|
assert SearchRequest(query="q").max_results == 10
|
|
57
|
-
assert ContentOptions().snippet is True
|
|
58
59
|
assert ContentOptions().highlights is False
|
|
59
60
|
assert ContentOptions().text is None
|
|
60
61
|
assert TextOptions().format == ContentFormat.TEXT
|
|
@@ -62,10 +63,7 @@ def test_request_defaults_and_nested_text_activation() -> None:
|
|
|
62
63
|
assert request.model_dump(mode="json", exclude_none=True) == {
|
|
63
64
|
"query": "q",
|
|
64
65
|
"max_results": 10,
|
|
65
|
-
"content": {"
|
|
66
|
-
}
|
|
67
|
-
assert ContentOptions(snippet=False).model_dump(exclude_none=True) == {
|
|
68
|
-
"snippet": False, "highlights": False
|
|
66
|
+
"content": {"highlights": False, "text": {"format": "text"}},
|
|
69
67
|
}
|
|
70
68
|
assert ContentOptions(highlights=True).highlights is True
|
|
71
69
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|