ceramic_ai 2.2.0__tar.gz → 2.3.0__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.
- ceramic_ai-2.3.0/.release-please-manifest.json +3 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/CHANGELOG.md +8 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/PKG-INFO +1 -1
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/examples/smoke_tests/python_sdk_async_smoke.py +24 -23
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/examples/smoke_tests/python_sdk_smoke.py +24 -23
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/pyproject.toml +1 -1
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_client.py +2 -10
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_version.py +1 -1
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/types/client_search_params.py +1 -4
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/api_resources/test_client.py +2 -4
- ceramic_ai-2.2.0/.release-please-manifest.json +0 -3
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/.gitignore +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/CONTRIBUTING.md +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/LICENSE +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/README.md +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/SECURITY.md +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/api.md +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/bin/publish-pypi +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/examples/.keep +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/release-please-config.json +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/requirements-dev.lock +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic/lib/.keep +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/__init__.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_base_client.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_compat.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_constants.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_exceptions.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_files.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_models.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_qs.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_resource.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_response.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_streaming.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_types.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/__init__.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_compat.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_datetime_parse.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_json.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_logs.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_path.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_proxy.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_reflection.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_resources_proxy.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_streams.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_sync.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_transform.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_typing.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_utils.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/lib/.keep +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/py.typed +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/resources/__init__.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/types/__init__.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/types/search_response.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/__init__.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/api_resources/__init__.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/conftest.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/sample_file.txt +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_client.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_extract_files.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_files.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_models.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_qs.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_required_args.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_response.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_streaming.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_transform.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_utils/test_json.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_utils/test_path.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_utils/test_proxy.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_utils/test_typing.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/utils.py +0 -0
- {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/uv.lock +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.3.0 (2026-05-12)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v2.2.0...v2.3.0](https://github.com/CeramicTeam/ceramic-python/compare/v2.2.0...v2.3.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* add maxDescriptionLength parameter ([8ea839c](https://github.com/CeramicTeam/ceramic-python/commit/8ea839c96d46ac2c60ad25e2c6e1da75c9f34c46))
|
|
10
|
+
|
|
3
11
|
## 2.2.0 (2026-05-12)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v2.1.1...v2.2.0](https://github.com/CeramicTeam/ceramic-python/compare/v2.1.1...v2.2.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: ceramic_ai
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: The official Python library for the ceramic API
|
|
5
5
|
Project-URL: Homepage, https://github.com/CeramicTeam/ceramic-python
|
|
6
6
|
Project-URL: Repository, https://github.com/CeramicTeam/ceramic-python
|
|
@@ -7,6 +7,7 @@ from ceramic_ai._exceptions import (
|
|
|
7
7
|
CeramicError,
|
|
8
8
|
APIStatusError,
|
|
9
9
|
AuthenticationError,
|
|
10
|
+
UnprocessableEntityError,
|
|
10
11
|
)
|
|
11
12
|
|
|
12
13
|
# ---------------------------
|
|
@@ -148,29 +149,29 @@ async def ex_query_validation() -> None:
|
|
|
148
149
|
# exc=BadRequestError,
|
|
149
150
|
# )
|
|
150
151
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
# cases: Iterable[Tuple[str, int, bool]] = [
|
|
155
|
-
# ("zero", 0, False),
|
|
156
|
-
# ("small", 40, False),
|
|
157
|
-
# ("valid_small", 50, True),
|
|
158
|
-
# ("valid_default", 1500, True),
|
|
159
|
-
# ("very_large", 6000, False),
|
|
160
|
-
# ]
|
|
152
|
+
async def ex_max_description_length_validations() -> None:
|
|
153
|
+
client = make_client()
|
|
161
154
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
155
|
+
cases = [
|
|
156
|
+
("zero", 0, False),
|
|
157
|
+
("below_min", 999, False),
|
|
158
|
+
("valid_min", 1000, True),
|
|
159
|
+
("valid_default", 3000, True),
|
|
160
|
+
("above_max", 8001, False),
|
|
161
|
+
]
|
|
162
|
+
|
|
163
|
+
for name, mdl, is_valid in cases:
|
|
164
|
+
label = f"max_description_length validation: {name} (max_description_length={mdl})"
|
|
165
|
+
if is_valid:
|
|
166
|
+
await expect_ok(label, lambda mdl=mdl: client.search(query="rate limits and retries", max_description_length=mdl))
|
|
167
|
+
else:
|
|
168
|
+
await expect_api_error(
|
|
169
|
+
label,
|
|
170
|
+
lambda mdl=mdl: client.search(query="rate limits and retries", max_description_length=mdl),
|
|
171
|
+
status=422,
|
|
172
|
+
code="invalid_parameter",
|
|
173
|
+
exc=UnprocessableEntityError,
|
|
174
|
+
)
|
|
174
175
|
|
|
175
176
|
|
|
176
177
|
async def main() -> None:
|
|
@@ -179,7 +180,7 @@ async def main() -> None:
|
|
|
179
180
|
await ex_invalid_api_key()
|
|
180
181
|
await ex_query_validation()
|
|
181
182
|
# await ex_max_results_validations()
|
|
182
|
-
|
|
183
|
+
await ex_max_description_length_validations()
|
|
183
184
|
except CeramicError as e:
|
|
184
185
|
print("\nCeramic SDK error (not an API status error):")
|
|
185
186
|
print(str(e))
|
|
@@ -6,6 +6,7 @@ from ceramic_ai._exceptions import (
|
|
|
6
6
|
CeramicError,
|
|
7
7
|
APIStatusError,
|
|
8
8
|
AuthenticationError,
|
|
9
|
+
UnprocessableEntityError,
|
|
9
10
|
)
|
|
10
11
|
|
|
11
12
|
# ---------------------------
|
|
@@ -149,29 +150,29 @@ def ex_query_validation() -> None:
|
|
|
149
150
|
# exc=BadRequestError,
|
|
150
151
|
# )
|
|
151
152
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
# cases: Iterable[Tuple[str, int, bool]] = [
|
|
156
|
-
# ("zero", 0, False),
|
|
157
|
-
# ("small", 40, False),
|
|
158
|
-
# ("valid_small", 50, True),
|
|
159
|
-
# ("valid_default", 1500, True),
|
|
160
|
-
# ("very_large", 6000, False),
|
|
161
|
-
# ]
|
|
153
|
+
def ex_max_description_length_validations() -> None:
|
|
154
|
+
client = make_client()
|
|
162
155
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
156
|
+
cases = [
|
|
157
|
+
("zero", 0, False),
|
|
158
|
+
("below_min", 999, False),
|
|
159
|
+
("valid_min", 1000, True),
|
|
160
|
+
("valid_default", 3000, True),
|
|
161
|
+
("above_max", 8001, False),
|
|
162
|
+
]
|
|
163
|
+
|
|
164
|
+
for name, mdl, is_valid in cases:
|
|
165
|
+
label = f"max_description_length validation: {name} (max_description_length={mdl})"
|
|
166
|
+
if is_valid:
|
|
167
|
+
expect_ok(label, lambda mdl=mdl: client.search(query="rate limits and retries", max_description_length=mdl))
|
|
168
|
+
else:
|
|
169
|
+
expect_api_error(
|
|
170
|
+
label,
|
|
171
|
+
lambda mdl=mdl: client.search(query="rate limits and retries", max_description_length=mdl),
|
|
172
|
+
status=422,
|
|
173
|
+
code="invalid_parameter",
|
|
174
|
+
exc=UnprocessableEntityError,
|
|
175
|
+
)
|
|
175
176
|
|
|
176
177
|
|
|
177
178
|
def main() -> None:
|
|
@@ -180,7 +181,7 @@ def main() -> None:
|
|
|
180
181
|
ex_invalid_api_key()
|
|
181
182
|
ex_query_validation()
|
|
182
183
|
# ex_max_results_validations()
|
|
183
|
-
|
|
184
|
+
ex_max_description_length_validations()
|
|
184
185
|
except CeramicError as e:
|
|
185
186
|
# This catches SDK configuration issues like missing env var, etc.
|
|
186
187
|
print("\nCeramic SDK error (not an API status error):")
|
|
@@ -212,7 +212,6 @@ class Ceramic(SyncAPIClient):
|
|
|
212
212
|
*,
|
|
213
213
|
query: str,
|
|
214
214
|
max_description_length: int | Omit = omit,
|
|
215
|
-
max_results: int | Omit = omit,
|
|
216
215
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
217
216
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
218
217
|
extra_headers: Headers | None = None,
|
|
@@ -227,9 +226,7 @@ class Ceramic(SyncAPIClient):
|
|
|
227
226
|
query: The search query in keyword format. Must contain between 1 and 50 words (words
|
|
228
227
|
are separated by spaces; extra whitespace is ignored).
|
|
229
228
|
|
|
230
|
-
max_description_length: Maximum character length for result
|
|
231
|
-
|
|
232
|
-
max_results: Maximum number of results to return.
|
|
229
|
+
max_description_length: Maximum character length for each result's description.
|
|
233
230
|
|
|
234
231
|
extra_headers: Send extra headers
|
|
235
232
|
|
|
@@ -247,7 +244,6 @@ class Ceramic(SyncAPIClient):
|
|
|
247
244
|
{
|
|
248
245
|
"query": query,
|
|
249
246
|
"max_description_length": max_description_length,
|
|
250
|
-
"max_results": max_results,
|
|
251
247
|
},
|
|
252
248
|
client_search_params.ClientSearchParams,
|
|
253
249
|
),
|
|
@@ -444,7 +440,6 @@ class AsyncCeramic(AsyncAPIClient):
|
|
|
444
440
|
*,
|
|
445
441
|
query: str,
|
|
446
442
|
max_description_length: int | Omit = omit,
|
|
447
|
-
max_results: int | Omit = omit,
|
|
448
443
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
449
444
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
450
445
|
extra_headers: Headers | None = None,
|
|
@@ -459,9 +454,7 @@ class AsyncCeramic(AsyncAPIClient):
|
|
|
459
454
|
query: The search query in keyword format. Must contain between 1 and 50 words (words
|
|
460
455
|
are separated by spaces; extra whitespace is ignored).
|
|
461
456
|
|
|
462
|
-
max_description_length: Maximum character length for result
|
|
463
|
-
|
|
464
|
-
max_results: Maximum number of results to return.
|
|
457
|
+
max_description_length: Maximum character length for each result's description.
|
|
465
458
|
|
|
466
459
|
extra_headers: Send extra headers
|
|
467
460
|
|
|
@@ -480,7 +473,6 @@ class AsyncCeramic(AsyncAPIClient):
|
|
|
480
473
|
{
|
|
481
474
|
"query": query,
|
|
482
475
|
"max_description_length": max_description_length,
|
|
483
|
-
"max_results": max_results,
|
|
484
476
|
},
|
|
485
477
|
client_search_params.ClientSearchParams,
|
|
486
478
|
),
|
|
@@ -18,7 +18,4 @@ class ClientSearchParams(TypedDict, total=False):
|
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
max_description_length: Annotated[int, PropertyInfo(alias="maxDescriptionLength")]
|
|
21
|
-
"""Maximum character length for result
|
|
22
|
-
|
|
23
|
-
max_results: Annotated[int, PropertyInfo(alias="maxResults")]
|
|
24
|
-
"""Maximum number of results to return."""
|
|
21
|
+
"""Maximum character length for each result's description."""
|
|
@@ -30,8 +30,7 @@ class TestClient:
|
|
|
30
30
|
def test_method_search_with_all_params(self, client: Ceramic) -> None:
|
|
31
31
|
client_ = client.search(
|
|
32
32
|
query="California rental laws",
|
|
33
|
-
max_description_length=
|
|
34
|
-
max_results=1,
|
|
33
|
+
max_description_length=1000,
|
|
35
34
|
)
|
|
36
35
|
assert_matches_type(SearchResponse, client_, path=["response"])
|
|
37
36
|
|
|
@@ -80,8 +79,7 @@ class TestAsyncClient:
|
|
|
80
79
|
async def test_method_search_with_all_params(self, async_client: AsyncCeramic) -> None:
|
|
81
80
|
client = await async_client.search(
|
|
82
81
|
query="California rental laws",
|
|
83
|
-
max_description_length=
|
|
84
|
-
max_results=1,
|
|
82
|
+
max_description_length=1000,
|
|
85
83
|
)
|
|
86
84
|
assert_matches_type(SearchResponse, client, path=["response"])
|
|
87
85
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|