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.
Files changed (73) hide show
  1. ceramic_ai-2.3.0/.release-please-manifest.json +3 -0
  2. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/CHANGELOG.md +8 -0
  3. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/PKG-INFO +1 -1
  4. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/examples/smoke_tests/python_sdk_async_smoke.py +24 -23
  5. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/examples/smoke_tests/python_sdk_smoke.py +24 -23
  6. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/pyproject.toml +1 -1
  7. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_client.py +2 -10
  8. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_version.py +1 -1
  9. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/types/client_search_params.py +1 -4
  10. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/api_resources/test_client.py +2 -4
  11. ceramic_ai-2.2.0/.release-please-manifest.json +0 -3
  12. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/.gitignore +0 -0
  13. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/CONTRIBUTING.md +0 -0
  14. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/LICENSE +0 -0
  15. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/README.md +0 -0
  16. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/SECURITY.md +0 -0
  17. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/api.md +0 -0
  18. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/bin/publish-pypi +0 -0
  19. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/examples/.keep +0 -0
  20. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/release-please-config.json +0 -0
  21. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/requirements-dev.lock +0 -0
  22. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic/lib/.keep +0 -0
  23. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/__init__.py +0 -0
  24. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_base_client.py +0 -0
  25. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_compat.py +0 -0
  26. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_constants.py +0 -0
  27. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_exceptions.py +0 -0
  28. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_files.py +0 -0
  29. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_models.py +0 -0
  30. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_qs.py +0 -0
  31. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_resource.py +0 -0
  32. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_response.py +0 -0
  33. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_streaming.py +0 -0
  34. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_types.py +0 -0
  35. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/__init__.py +0 -0
  36. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_compat.py +0 -0
  37. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_datetime_parse.py +0 -0
  38. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_json.py +0 -0
  39. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_logs.py +0 -0
  40. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_path.py +0 -0
  41. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_proxy.py +0 -0
  42. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_reflection.py +0 -0
  43. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_resources_proxy.py +0 -0
  44. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_streams.py +0 -0
  45. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_sync.py +0 -0
  46. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_transform.py +0 -0
  47. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_typing.py +0 -0
  48. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/_utils/_utils.py +0 -0
  49. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/lib/.keep +0 -0
  50. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/py.typed +0 -0
  51. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/resources/__init__.py +0 -0
  52. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/types/__init__.py +0 -0
  53. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/src/ceramic_ai/types/search_response.py +0 -0
  54. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/__init__.py +0 -0
  55. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/api_resources/__init__.py +0 -0
  56. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/conftest.py +0 -0
  57. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/sample_file.txt +0 -0
  58. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_client.py +0 -0
  59. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_extract_files.py +0 -0
  60. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_files.py +0 -0
  61. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_models.py +0 -0
  62. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_qs.py +0 -0
  63. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_required_args.py +0 -0
  64. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_response.py +0 -0
  65. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_streaming.py +0 -0
  66. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_transform.py +0 -0
  67. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_utils/test_datetime_parse.py +0 -0
  68. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_utils/test_json.py +0 -0
  69. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_utils/test_path.py +0 -0
  70. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_utils/test_proxy.py +0 -0
  71. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/test_utils/test_typing.py +0 -0
  72. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/tests/utils.py +0 -0
  73. {ceramic_ai-2.2.0 → ceramic_ai-2.3.0}/uv.lock +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "2.3.0"
3
+ }
@@ -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.2.0
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
- # async def ex_max_description_length_validations() -> None:
152
- # client = make_client()
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
- # for name, mdl, is_valid in cases:
163
- # label = f"max_description_length validation: {name} (max_description_length={mdl})"
164
- # if is_valid:
165
- # await expect_ok(label, lambda mdl=mdl: client.search(query="rate limits and retries", max_description_length=mdl))
166
- # else:
167
- # await expect_api_error(
168
- # label,
169
- # lambda mdl=mdl: client.search(query="rate limits and retries", max_description_length=mdl),
170
- # status=400,
171
- # code="invalid_parameter",
172
- # exc=BadRequestError,
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
- # await ex_max_description_length_validations()
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
- # def ex_max_description_length_validations() -> None:
153
- # client = make_client()
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
- # for name, mdl, is_valid in cases:
164
- # label = f"max_description_length validation: {name} (max_description_length={mdl})"
165
- # if is_valid:
166
- # expect_ok(label, lambda mdl=mdl: client.search(query="rate limits and retries", max_description_length=mdl))
167
- # else:
168
- # expect_api_error(
169
- # label,
170
- # lambda mdl=mdl: client.search(query="rate limits and retries", max_description_length=mdl),
171
- # status=400,
172
- # code="invalid_parameter",
173
- # exc=BadRequestError,
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
- # ex_max_description_length_validations()
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):")
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ceramic_ai"
3
- version = "2.2.0"
3
+ version = "2.3.0"
4
4
  description = "The official Python library for the ceramic API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -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 descriptions.
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 descriptions.
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
  ),
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "ceramic_ai"
4
- __version__ = "2.2.0" # x-release-please-version
4
+ __version__ = "2.3.0" # x-release-please-version
@@ -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 descriptions."""
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=1,
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=1,
84
- max_results=1,
82
+ max_description_length=1000,
85
83
  )
86
84
  assert_matches_type(SearchResponse, client, path=["response"])
87
85
 
@@ -1,3 +0,0 @@
1
- {
2
- ".": "2.2.0"
3
- }
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