codeset 0.1.0a15__tar.gz → 0.1.0a17__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 codeset might be problematic. Click here for more details.

Files changed (100) hide show
  1. codeset-0.1.0a17/.release-please-manifest.json +3 -0
  2. {codeset-0.1.0a15 → codeset-0.1.0a17}/CHANGELOG.md +17 -0
  3. {codeset-0.1.0a15 → codeset-0.1.0a17}/PKG-INFO +1 -1
  4. {codeset-0.1.0a15 → codeset-0.1.0a17}/api.md +12 -0
  5. {codeset-0.1.0a15 → codeset-0.1.0a17}/pyproject.toml +1 -1
  6. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_client.py +9 -1
  7. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_version.py +1 -1
  8. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/resources/__init__.py +14 -0
  9. codeset-0.1.0a17/src/codeset/resources/datasets.py +135 -0
  10. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/resources/samples.py +38 -4
  11. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/__init__.py +1 -0
  12. codeset-0.1.0a17/src/codeset/types/dataset_list_response.py +26 -0
  13. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/sample_list_params.py +9 -0
  14. codeset-0.1.0a17/src/codeset/types/sample_list_response.py +91 -0
  15. codeset-0.1.0a17/tests/api_resources/test_datasets.py +80 -0
  16. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/api_resources/test_samples.py +6 -0
  17. codeset-0.1.0a15/.release-please-manifest.json +0 -3
  18. codeset-0.1.0a15/src/codeset/types/sample_list_response.py +0 -41
  19. {codeset-0.1.0a15 → codeset-0.1.0a17}/.gitignore +0 -0
  20. {codeset-0.1.0a15 → codeset-0.1.0a17}/CONTRIBUTING.md +0 -0
  21. {codeset-0.1.0a15 → codeset-0.1.0a17}/LICENSE +0 -0
  22. {codeset-0.1.0a15 → codeset-0.1.0a17}/README.md +0 -0
  23. {codeset-0.1.0a15 → codeset-0.1.0a17}/SECURITY.md +0 -0
  24. {codeset-0.1.0a15 → codeset-0.1.0a17}/bin/check-release-environment +0 -0
  25. {codeset-0.1.0a15 → codeset-0.1.0a17}/bin/publish-pypi +0 -0
  26. {codeset-0.1.0a15 → codeset-0.1.0a17}/examples/.keep +0 -0
  27. {codeset-0.1.0a15 → codeset-0.1.0a17}/noxfile.py +0 -0
  28. {codeset-0.1.0a15 → codeset-0.1.0a17}/release-please-config.json +0 -0
  29. {codeset-0.1.0a15 → codeset-0.1.0a17}/requirements-dev.lock +0 -0
  30. {codeset-0.1.0a15 → codeset-0.1.0a17}/requirements.lock +0 -0
  31. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/__init__.py +0 -0
  32. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_base_client.py +0 -0
  33. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_compat.py +0 -0
  34. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_constants.py +0 -0
  35. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_exceptions.py +0 -0
  36. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_files.py +0 -0
  37. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_models.py +0 -0
  38. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_qs.py +0 -0
  39. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_resource.py +0 -0
  40. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_response.py +0 -0
  41. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_streaming.py +0 -0
  42. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_types.py +0 -0
  43. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_utils/__init__.py +0 -0
  44. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_utils/_compat.py +0 -0
  45. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_utils/_datetime_parse.py +0 -0
  46. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_utils/_logs.py +0 -0
  47. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_utils/_proxy.py +0 -0
  48. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_utils/_reflection.py +0 -0
  49. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_utils/_resources_proxy.py +0 -0
  50. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_utils/_streams.py +0 -0
  51. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_utils/_sync.py +0 -0
  52. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_utils/_transform.py +0 -0
  53. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_utils/_typing.py +0 -0
  54. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/_utils/_utils.py +0 -0
  55. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/lib/.keep +0 -0
  56. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/py.typed +0 -0
  57. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/resources/health.py +0 -0
  58. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/resources/sessions/__init__.py +0 -0
  59. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/resources/sessions/sessions.py +0 -0
  60. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/resources/sessions/verify.py +0 -0
  61. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/container_info.py +0 -0
  62. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/error_info.py +0 -0
  63. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/health_check_response.py +0 -0
  64. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/sample_download_params.py +0 -0
  65. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/session.py +0 -0
  66. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/session_close_response.py +0 -0
  67. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/session_create_params.py +0 -0
  68. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/session_create_response.py +0 -0
  69. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/session_execute_command_params.py +0 -0
  70. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/session_execute_command_response.py +0 -0
  71. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/session_list_response.py +0 -0
  72. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/session_status.py +0 -0
  73. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/session_str_replace_params.py +0 -0
  74. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/session_str_replace_response.py +0 -0
  75. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/sessions/__init__.py +0 -0
  76. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/sessions/job_status.py +0 -0
  77. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/sessions/verify_start_response.py +0 -0
  78. {codeset-0.1.0a15 → codeset-0.1.0a17}/src/codeset/types/sessions/verify_status_response.py +0 -0
  79. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/__init__.py +0 -0
  80. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/api_resources/__init__.py +0 -0
  81. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/api_resources/sessions/__init__.py +0 -0
  82. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/api_resources/sessions/test_verify.py +0 -0
  83. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/api_resources/test_health.py +0 -0
  84. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/api_resources/test_sessions.py +0 -0
  85. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/conftest.py +0 -0
  86. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/sample_file.txt +0 -0
  87. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/test_client.py +0 -0
  88. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/test_deepcopy.py +0 -0
  89. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/test_extract_files.py +0 -0
  90. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/test_files.py +0 -0
  91. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/test_models.py +0 -0
  92. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/test_qs.py +0 -0
  93. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/test_required_args.py +0 -0
  94. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/test_response.py +0 -0
  95. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/test_streaming.py +0 -0
  96. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/test_transform.py +0 -0
  97. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/test_utils/test_datetime_parse.py +0 -0
  98. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/test_utils/test_proxy.py +0 -0
  99. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/test_utils/test_typing.py +0 -0
  100. {codeset-0.1.0a15 → codeset-0.1.0a17}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.17"
3
+ }
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.17 (2025-10-13)
4
+
5
+ Full Changelog: [v0.1.0-alpha.16...v0.1.0-alpha.17](https://github.com/codeset-ai/codeset-sdk/compare/v0.1.0-alpha.16...v0.1.0-alpha.17)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([144e105](https://github.com/codeset-ai/codeset-sdk/commit/144e1055278e5a11e3c9632ab6e8849012e280be))
10
+ * **api:** api update ([8f37713](https://github.com/codeset-ai/codeset-sdk/commit/8f37713404d39a21d5fd4f0b4a1a93d059511391))
11
+
12
+ ## 0.1.0-alpha.16 (2025-10-12)
13
+
14
+ Full Changelog: [v0.1.0-alpha.15...v0.1.0-alpha.16](https://github.com/codeset-ai/codeset-sdk/compare/v0.1.0-alpha.15...v0.1.0-alpha.16)
15
+
16
+ ### Features
17
+
18
+ * **api:** manual updates ([08bcf5d](https://github.com/codeset-ai/codeset-sdk/commit/08bcf5d5a40d12bc02556f9f7cd66213737e509b))
19
+
3
20
  ## 0.1.0-alpha.15 (2025-10-12)
4
21
 
5
22
  Full Changelog: [v0.1.0-alpha.14...v0.1.0-alpha.15](https://github.com/codeset-ai/codeset-sdk/compare/v0.1.0-alpha.14...v0.1.0-alpha.15)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: codeset
3
- Version: 0.1.0a15
3
+ Version: 0.1.0a17
4
4
  Summary: The official Python library for the codeset API
5
5
  Project-URL: Homepage, https://github.com/codeset-ai/codeset-sdk
6
6
  Project-URL: Repository, https://github.com/codeset-ai/codeset-sdk
@@ -23,6 +23,18 @@ Methods:
23
23
  - <code title="get /samples">client.samples.<a href="./src/codeset/resources/samples.py">list</a>(\*\*<a href="src/codeset/types/sample_list_params.py">params</a>) -> <a href="./src/codeset/types/sample_list_response.py">SampleListResponse</a></code>
24
24
  - <code title="get /samples/{dataset}/{sample_id}/download">client.samples.<a href="./src/codeset/resources/samples.py">download</a>(sample_id, \*, dataset, \*\*<a href="src/codeset/types/sample_download_params.py">params</a>) -> object</code>
25
25
 
26
+ # Datasets
27
+
28
+ Types:
29
+
30
+ ```python
31
+ from codeset.types import DatasetListResponse
32
+ ```
33
+
34
+ Methods:
35
+
36
+ - <code title="get /datasets">client.datasets.<a href="./src/codeset/resources/datasets.py">list</a>() -> <a href="./src/codeset/types/dataset_list_response.py">DatasetListResponse</a></code>
37
+
26
38
  # Sessions
27
39
 
28
40
  Types:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codeset"
3
- version = "0.1.0-alpha.15"
3
+ version = "0.1.0-alpha.17"
4
4
  description = "The official Python library for the codeset API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -22,7 +22,7 @@ from ._types import (
22
22
  )
23
23
  from ._utils import is_given, get_async_library
24
24
  from ._version import __version__
25
- from .resources import health, samples
25
+ from .resources import health, samples, datasets
26
26
  from ._streaming import Stream as Stream, AsyncStream as AsyncStream
27
27
  from ._exceptions import APIStatusError
28
28
  from ._base_client import (
@@ -38,6 +38,7 @@ __all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Codeset",
38
38
  class Codeset(SyncAPIClient):
39
39
  health: health.HealthResource
40
40
  samples: samples.SamplesResource
41
+ datasets: datasets.DatasetsResource
41
42
  sessions: sessions.SessionsResource
42
43
  with_raw_response: CodesetWithRawResponse
43
44
  with_streaming_response: CodesetWithStreamedResponse
@@ -94,6 +95,7 @@ class Codeset(SyncAPIClient):
94
95
 
95
96
  self.health = health.HealthResource(self)
96
97
  self.samples = samples.SamplesResource(self)
98
+ self.datasets = datasets.DatasetsResource(self)
97
99
  self.sessions = sessions.SessionsResource(self)
98
100
  self.with_raw_response = CodesetWithRawResponse(self)
99
101
  self.with_streaming_response = CodesetWithStreamedResponse(self)
@@ -219,6 +221,7 @@ class Codeset(SyncAPIClient):
219
221
  class AsyncCodeset(AsyncAPIClient):
220
222
  health: health.AsyncHealthResource
221
223
  samples: samples.AsyncSamplesResource
224
+ datasets: datasets.AsyncDatasetsResource
222
225
  sessions: sessions.AsyncSessionsResource
223
226
  with_raw_response: AsyncCodesetWithRawResponse
224
227
  with_streaming_response: AsyncCodesetWithStreamedResponse
@@ -275,6 +278,7 @@ class AsyncCodeset(AsyncAPIClient):
275
278
 
276
279
  self.health = health.AsyncHealthResource(self)
277
280
  self.samples = samples.AsyncSamplesResource(self)
281
+ self.datasets = datasets.AsyncDatasetsResource(self)
278
282
  self.sessions = sessions.AsyncSessionsResource(self)
279
283
  self.with_raw_response = AsyncCodesetWithRawResponse(self)
280
284
  self.with_streaming_response = AsyncCodesetWithStreamedResponse(self)
@@ -401,6 +405,7 @@ class CodesetWithRawResponse:
401
405
  def __init__(self, client: Codeset) -> None:
402
406
  self.health = health.HealthResourceWithRawResponse(client.health)
403
407
  self.samples = samples.SamplesResourceWithRawResponse(client.samples)
408
+ self.datasets = datasets.DatasetsResourceWithRawResponse(client.datasets)
404
409
  self.sessions = sessions.SessionsResourceWithRawResponse(client.sessions)
405
410
 
406
411
 
@@ -408,6 +413,7 @@ class AsyncCodesetWithRawResponse:
408
413
  def __init__(self, client: AsyncCodeset) -> None:
409
414
  self.health = health.AsyncHealthResourceWithRawResponse(client.health)
410
415
  self.samples = samples.AsyncSamplesResourceWithRawResponse(client.samples)
416
+ self.datasets = datasets.AsyncDatasetsResourceWithRawResponse(client.datasets)
411
417
  self.sessions = sessions.AsyncSessionsResourceWithRawResponse(client.sessions)
412
418
 
413
419
 
@@ -415,6 +421,7 @@ class CodesetWithStreamedResponse:
415
421
  def __init__(self, client: Codeset) -> None:
416
422
  self.health = health.HealthResourceWithStreamingResponse(client.health)
417
423
  self.samples = samples.SamplesResourceWithStreamingResponse(client.samples)
424
+ self.datasets = datasets.DatasetsResourceWithStreamingResponse(client.datasets)
418
425
  self.sessions = sessions.SessionsResourceWithStreamingResponse(client.sessions)
419
426
 
420
427
 
@@ -422,6 +429,7 @@ class AsyncCodesetWithStreamedResponse:
422
429
  def __init__(self, client: AsyncCodeset) -> None:
423
430
  self.health = health.AsyncHealthResourceWithStreamingResponse(client.health)
424
431
  self.samples = samples.AsyncSamplesResourceWithStreamingResponse(client.samples)
432
+ self.datasets = datasets.AsyncDatasetsResourceWithStreamingResponse(client.datasets)
425
433
  self.sessions = sessions.AsyncSessionsResourceWithStreamingResponse(client.sessions)
426
434
 
427
435
 
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "codeset"
4
- __version__ = "0.1.0-alpha.15" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.17" # x-release-please-version
@@ -16,6 +16,14 @@ from .samples import (
16
16
  SamplesResourceWithStreamingResponse,
17
17
  AsyncSamplesResourceWithStreamingResponse,
18
18
  )
19
+ from .datasets import (
20
+ DatasetsResource,
21
+ AsyncDatasetsResource,
22
+ DatasetsResourceWithRawResponse,
23
+ AsyncDatasetsResourceWithRawResponse,
24
+ DatasetsResourceWithStreamingResponse,
25
+ AsyncDatasetsResourceWithStreamingResponse,
26
+ )
19
27
  from .sessions import (
20
28
  SessionsResource,
21
29
  AsyncSessionsResource,
@@ -38,6 +46,12 @@ __all__ = [
38
46
  "AsyncSamplesResourceWithRawResponse",
39
47
  "SamplesResourceWithStreamingResponse",
40
48
  "AsyncSamplesResourceWithStreamingResponse",
49
+ "DatasetsResource",
50
+ "AsyncDatasetsResource",
51
+ "DatasetsResourceWithRawResponse",
52
+ "AsyncDatasetsResourceWithRawResponse",
53
+ "DatasetsResourceWithStreamingResponse",
54
+ "AsyncDatasetsResourceWithStreamingResponse",
41
55
  "SessionsResource",
42
56
  "AsyncSessionsResource",
43
57
  "SessionsResourceWithRawResponse",
@@ -0,0 +1,135 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ import httpx
6
+
7
+ from .._types import Body, Query, Headers, NotGiven, not_given
8
+ from .._compat import cached_property
9
+ from .._resource import SyncAPIResource, AsyncAPIResource
10
+ from .._response import (
11
+ to_raw_response_wrapper,
12
+ to_streamed_response_wrapper,
13
+ async_to_raw_response_wrapper,
14
+ async_to_streamed_response_wrapper,
15
+ )
16
+ from .._base_client import make_request_options
17
+ from ..types.dataset_list_response import DatasetListResponse
18
+
19
+ __all__ = ["DatasetsResource", "AsyncDatasetsResource"]
20
+
21
+
22
+ class DatasetsResource(SyncAPIResource):
23
+ @cached_property
24
+ def with_raw_response(self) -> DatasetsResourceWithRawResponse:
25
+ """
26
+ This property can be used as a prefix for any HTTP method call to return
27
+ the raw response object instead of the parsed content.
28
+
29
+ For more information, see https://www.github.com/codeset-ai/codeset-sdk#accessing-raw-response-data-eg-headers
30
+ """
31
+ return DatasetsResourceWithRawResponse(self)
32
+
33
+ @cached_property
34
+ def with_streaming_response(self) -> DatasetsResourceWithStreamingResponse:
35
+ """
36
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
37
+
38
+ For more information, see https://www.github.com/codeset-ai/codeset-sdk#with_streaming_response
39
+ """
40
+ return DatasetsResourceWithStreamingResponse(self)
41
+
42
+ def list(
43
+ self,
44
+ *,
45
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
46
+ # The extra values given here take precedence over values defined on the client or passed to this method.
47
+ extra_headers: Headers | None = None,
48
+ extra_query: Query | None = None,
49
+ extra_body: Body | None = None,
50
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
51
+ ) -> DatasetListResponse:
52
+ """List available datasets"""
53
+ return self._get(
54
+ "/datasets",
55
+ options=make_request_options(
56
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
57
+ ),
58
+ cast_to=DatasetListResponse,
59
+ )
60
+
61
+
62
+ class AsyncDatasetsResource(AsyncAPIResource):
63
+ @cached_property
64
+ def with_raw_response(self) -> AsyncDatasetsResourceWithRawResponse:
65
+ """
66
+ This property can be used as a prefix for any HTTP method call to return
67
+ the raw response object instead of the parsed content.
68
+
69
+ For more information, see https://www.github.com/codeset-ai/codeset-sdk#accessing-raw-response-data-eg-headers
70
+ """
71
+ return AsyncDatasetsResourceWithRawResponse(self)
72
+
73
+ @cached_property
74
+ def with_streaming_response(self) -> AsyncDatasetsResourceWithStreamingResponse:
75
+ """
76
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
77
+
78
+ For more information, see https://www.github.com/codeset-ai/codeset-sdk#with_streaming_response
79
+ """
80
+ return AsyncDatasetsResourceWithStreamingResponse(self)
81
+
82
+ async def list(
83
+ self,
84
+ *,
85
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
86
+ # The extra values given here take precedence over values defined on the client or passed to this method.
87
+ extra_headers: Headers | None = None,
88
+ extra_query: Query | None = None,
89
+ extra_body: Body | None = None,
90
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
91
+ ) -> DatasetListResponse:
92
+ """List available datasets"""
93
+ return await self._get(
94
+ "/datasets",
95
+ options=make_request_options(
96
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
97
+ ),
98
+ cast_to=DatasetListResponse,
99
+ )
100
+
101
+
102
+ class DatasetsResourceWithRawResponse:
103
+ def __init__(self, datasets: DatasetsResource) -> None:
104
+ self._datasets = datasets
105
+
106
+ self.list = to_raw_response_wrapper(
107
+ datasets.list,
108
+ )
109
+
110
+
111
+ class AsyncDatasetsResourceWithRawResponse:
112
+ def __init__(self, datasets: AsyncDatasetsResource) -> None:
113
+ self._datasets = datasets
114
+
115
+ self.list = async_to_raw_response_wrapper(
116
+ datasets.list,
117
+ )
118
+
119
+
120
+ class DatasetsResourceWithStreamingResponse:
121
+ def __init__(self, datasets: DatasetsResource) -> None:
122
+ self._datasets = datasets
123
+
124
+ self.list = to_streamed_response_wrapper(
125
+ datasets.list,
126
+ )
127
+
128
+
129
+ class AsyncDatasetsResourceWithStreamingResponse:
130
+ def __init__(self, datasets: AsyncDatasetsResource) -> None:
131
+ self._datasets = datasets
132
+
133
+ self.list = async_to_streamed_response_wrapper(
134
+ datasets.list,
135
+ )
@@ -47,6 +47,9 @@ class SamplesResource(SyncAPIResource):
47
47
  self,
48
48
  *,
49
49
  dataset: Optional[str] | Omit = omit,
50
+ page: Optional[int] | Omit = omit,
51
+ page_size: Optional[int] | Omit = omit,
52
+ search: Optional[str] | Omit = omit,
50
53
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
51
54
  # The extra values given here take precedence over values defined on the client or passed to this method.
52
55
  extra_headers: Headers | None = None,
@@ -55,11 +58,17 @@ class SamplesResource(SyncAPIResource):
55
58
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
56
59
  ) -> SampleListResponse:
57
60
  """
58
- List available samples, optionally filtered by dataset
61
+ List available samples with optional pagination, optionally filtered by dataset
59
62
 
60
63
  Args:
61
64
  dataset: Filter samples by dataset name
62
65
 
66
+ page: Page number (1-based). If not provided, returns all samples
67
+
68
+ page_size: Number of samples per page (max 100). If not provided, returns all samples
69
+
70
+ search: Search for samples by instance_id
71
+
63
72
  extra_headers: Send extra headers
64
73
 
65
74
  extra_query: Add additional query parameters to the request
@@ -75,7 +84,15 @@ class SamplesResource(SyncAPIResource):
75
84
  extra_query=extra_query,
76
85
  extra_body=extra_body,
77
86
  timeout=timeout,
78
- query=maybe_transform({"dataset": dataset}, sample_list_params.SampleListParams),
87
+ query=maybe_transform(
88
+ {
89
+ "dataset": dataset,
90
+ "page": page,
91
+ "page_size": page_size,
92
+ "search": search,
93
+ },
94
+ sample_list_params.SampleListParams,
95
+ ),
79
96
  ),
80
97
  cast_to=SampleListResponse,
81
98
  )
@@ -146,6 +163,9 @@ class AsyncSamplesResource(AsyncAPIResource):
146
163
  self,
147
164
  *,
148
165
  dataset: Optional[str] | Omit = omit,
166
+ page: Optional[int] | Omit = omit,
167
+ page_size: Optional[int] | Omit = omit,
168
+ search: Optional[str] | Omit = omit,
149
169
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
150
170
  # The extra values given here take precedence over values defined on the client or passed to this method.
151
171
  extra_headers: Headers | None = None,
@@ -154,11 +174,17 @@ class AsyncSamplesResource(AsyncAPIResource):
154
174
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
155
175
  ) -> SampleListResponse:
156
176
  """
157
- List available samples, optionally filtered by dataset
177
+ List available samples with optional pagination, optionally filtered by dataset
158
178
 
159
179
  Args:
160
180
  dataset: Filter samples by dataset name
161
181
 
182
+ page: Page number (1-based). If not provided, returns all samples
183
+
184
+ page_size: Number of samples per page (max 100). If not provided, returns all samples
185
+
186
+ search: Search for samples by instance_id
187
+
162
188
  extra_headers: Send extra headers
163
189
 
164
190
  extra_query: Add additional query parameters to the request
@@ -174,7 +200,15 @@ class AsyncSamplesResource(AsyncAPIResource):
174
200
  extra_query=extra_query,
175
201
  extra_body=extra_body,
176
202
  timeout=timeout,
177
- query=await async_maybe_transform({"dataset": dataset}, sample_list_params.SampleListParams),
203
+ query=await async_maybe_transform(
204
+ {
205
+ "dataset": dataset,
206
+ "page": page,
207
+ "page_size": page_size,
208
+ "search": search,
209
+ },
210
+ sample_list_params.SampleListParams,
211
+ ),
178
212
  ),
179
213
  cast_to=SampleListResponse,
180
214
  )
@@ -8,6 +8,7 @@ from .container_info import ContainerInfo as ContainerInfo
8
8
  from .session_status import SessionStatus as SessionStatus
9
9
  from .sample_list_params import SampleListParams as SampleListParams
10
10
  from .sample_list_response import SampleListResponse as SampleListResponse
11
+ from .dataset_list_response import DatasetListResponse as DatasetListResponse
11
12
  from .health_check_response import HealthCheckResponse as HealthCheckResponse
12
13
  from .session_create_params import SessionCreateParams as SessionCreateParams
13
14
  from .session_list_response import SessionListResponse as SessionListResponse
@@ -0,0 +1,26 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import TypeAlias
6
+
7
+ from .._models import BaseModel
8
+
9
+ __all__ = ["DatasetListResponse", "DatasetListResponseItem"]
10
+
11
+
12
+ class DatasetListResponseItem(BaseModel):
13
+ name: str
14
+ """Unique name of the dataset."""
15
+
16
+ sample_count: int
17
+ """Number of samples in the dataset."""
18
+
19
+ created_at: Optional[datetime] = None
20
+ """Timestamp when the dataset was first created (UTC)."""
21
+
22
+ description: Optional[str] = None
23
+ """A brief description of the dataset."""
24
+
25
+
26
+ DatasetListResponse: TypeAlias = List[DatasetListResponseItem]
@@ -11,3 +11,12 @@ __all__ = ["SampleListParams"]
11
11
  class SampleListParams(TypedDict, total=False):
12
12
  dataset: Optional[str]
13
13
  """Filter samples by dataset name"""
14
+
15
+ page: Optional[int]
16
+ """Page number (1-based). If not provided, returns all samples"""
17
+
18
+ page_size: Optional[int]
19
+ """Number of samples per page (max 100). If not provided, returns all samples"""
20
+
21
+ search: Optional[str]
22
+ """Search for samples by instance_id"""
@@ -0,0 +1,91 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal
6
+
7
+ from .._models import BaseModel
8
+
9
+ __all__ = ["SampleListResponse", "Sample"]
10
+
11
+
12
+ class Sample(BaseModel):
13
+ base_commit: str
14
+ """Base commit hash for the sample."""
15
+
16
+ environment_setup_commit: str
17
+ """Environment setup commit hash for the sample."""
18
+
19
+ fail_to_fail: List[str]
20
+ """List of test names that remained FAIL to FAIL."""
21
+
22
+ fail_to_pass: List[str]
23
+ """List of test names that changed from FAIL to PASS."""
24
+
25
+ hints_text: str
26
+ """Hints text for the sample (concatenated issue comments)."""
27
+
28
+ instance_id: str
29
+ """Instance identifier for the sample (e.g., 'psf\\__\\__requests-1234')."""
30
+
31
+ language: str
32
+ """Primary programming language of the sample."""
33
+
34
+ non_code_patch: str
35
+ """Non-code patch for the sample."""
36
+
37
+ pass_to_pass: List[str]
38
+ """List of test names that remained PASS to PASS."""
39
+
40
+ patch: str
41
+ """Code patch (diff) that fixes the bug for the sample."""
42
+
43
+ problem_statement: str
44
+ """Problem statement for the sample (issue title + body)."""
45
+
46
+ repo: str
47
+ """Repository full name for the sample (e.g., 'psf/requests')."""
48
+
49
+ sample_id: str
50
+ """Unique identifier for the sample (e.g., 'traccar-1')."""
51
+
52
+ test_patch: str
53
+ """Test patch (diff) for the sample."""
54
+
55
+ verifier: Literal["test_suite", "static_analysis", "linter", "custom"]
56
+ """The type of verifier used for this sample."""
57
+
58
+ created_at: Optional[datetime] = None
59
+ """Timestamp when the sample was created (UTC)."""
60
+
61
+ dataset: Optional[str] = None
62
+ """Dataset name for the sample."""
63
+
64
+ description: Optional[str] = None
65
+ """A brief description of the sample."""
66
+
67
+ latest: Optional[bool] = None
68
+ """Whether this is the latest version."""
69
+
70
+ version: Optional[int] = None
71
+ """Version number of the sample."""
72
+
73
+ version_description: Optional[str] = None
74
+ """Description of this version."""
75
+
76
+
77
+ class SampleListResponse(BaseModel):
78
+ has_more: bool
79
+ """Indicates if more pages of results are available."""
80
+
81
+ page: int
82
+ """Current page number (1-based)."""
83
+
84
+ page_size: int
85
+ """Number of samples per page."""
86
+
87
+ samples: List[Sample]
88
+ """List of samples for the current page."""
89
+
90
+ total_count: int
91
+ """Total number of samples available."""
@@ -0,0 +1,80 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ from typing import Any, cast
7
+
8
+ import pytest
9
+
10
+ from codeset import Codeset, AsyncCodeset
11
+ from tests.utils import assert_matches_type
12
+ from codeset.types import DatasetListResponse
13
+
14
+ base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
15
+
16
+
17
+ class TestDatasets:
18
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
19
+
20
+ @pytest.mark.skip(reason="Prism tests are disabled")
21
+ @parametrize
22
+ def test_method_list(self, client: Codeset) -> None:
23
+ dataset = client.datasets.list()
24
+ assert_matches_type(DatasetListResponse, dataset, path=["response"])
25
+
26
+ @pytest.mark.skip(reason="Prism tests are disabled")
27
+ @parametrize
28
+ def test_raw_response_list(self, client: Codeset) -> None:
29
+ response = client.datasets.with_raw_response.list()
30
+
31
+ assert response.is_closed is True
32
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
33
+ dataset = response.parse()
34
+ assert_matches_type(DatasetListResponse, dataset, path=["response"])
35
+
36
+ @pytest.mark.skip(reason="Prism tests are disabled")
37
+ @parametrize
38
+ def test_streaming_response_list(self, client: Codeset) -> None:
39
+ with client.datasets.with_streaming_response.list() as response:
40
+ assert not response.is_closed
41
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
42
+
43
+ dataset = response.parse()
44
+ assert_matches_type(DatasetListResponse, dataset, path=["response"])
45
+
46
+ assert cast(Any, response.is_closed) is True
47
+
48
+
49
+ class TestAsyncDatasets:
50
+ parametrize = pytest.mark.parametrize(
51
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
52
+ )
53
+
54
+ @pytest.mark.skip(reason="Prism tests are disabled")
55
+ @parametrize
56
+ async def test_method_list(self, async_client: AsyncCodeset) -> None:
57
+ dataset = await async_client.datasets.list()
58
+ assert_matches_type(DatasetListResponse, dataset, path=["response"])
59
+
60
+ @pytest.mark.skip(reason="Prism tests are disabled")
61
+ @parametrize
62
+ async def test_raw_response_list(self, async_client: AsyncCodeset) -> None:
63
+ response = await async_client.datasets.with_raw_response.list()
64
+
65
+ assert response.is_closed is True
66
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
67
+ dataset = await response.parse()
68
+ assert_matches_type(DatasetListResponse, dataset, path=["response"])
69
+
70
+ @pytest.mark.skip(reason="Prism tests are disabled")
71
+ @parametrize
72
+ async def test_streaming_response_list(self, async_client: AsyncCodeset) -> None:
73
+ async with async_client.datasets.with_streaming_response.list() as response:
74
+ assert not response.is_closed
75
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
76
+
77
+ dataset = await response.parse()
78
+ assert_matches_type(DatasetListResponse, dataset, path=["response"])
79
+
80
+ assert cast(Any, response.is_closed) is True
@@ -28,6 +28,9 @@ class TestSamples:
28
28
  def test_method_list_with_all_params(self, client: Codeset) -> None:
29
29
  sample = client.samples.list(
30
30
  dataset="dataset",
31
+ page=1,
32
+ page_size=1,
33
+ search="search",
31
34
  )
32
35
  assert_matches_type(SampleListResponse, sample, path=["response"])
33
36
 
@@ -132,6 +135,9 @@ class TestAsyncSamples:
132
135
  async def test_method_list_with_all_params(self, async_client: AsyncCodeset) -> None:
133
136
  sample = await async_client.samples.list(
134
137
  dataset="dataset",
138
+ page=1,
139
+ page_size=1,
140
+ search="search",
135
141
  )
136
142
  assert_matches_type(SampleListResponse, sample, path=["response"])
137
143
 
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.1.0-alpha.15"
3
- }
@@ -1,41 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import List, Optional
4
- from datetime import datetime
5
- from typing_extensions import Literal, TypeAlias
6
-
7
- from .._models import BaseModel
8
-
9
- __all__ = ["SampleListResponse", "SampleListResponseItem"]
10
-
11
-
12
- class SampleListResponseItem(BaseModel):
13
- language: str
14
- """Primary programming language of the sample."""
15
-
16
- sample_id: str
17
- """Unique identifier for the sample (e.g., 'traccar-1')."""
18
-
19
- verifier: Literal["test_suite", "static_analysis", "linter", "custom"]
20
- """The type of verifier used for this sample."""
21
-
22
- created_at: Optional[datetime] = None
23
- """Timestamp when the sample was created (UTC)."""
24
-
25
- dataset: Optional[str] = None
26
- """Dataset name for the sample."""
27
-
28
- description: Optional[str] = None
29
- """A brief description of the sample."""
30
-
31
- latest: Optional[bool] = None
32
- """Whether this is the latest version."""
33
-
34
- version: Optional[int] = None
35
- """Version number of the sample."""
36
-
37
- version_description: Optional[str] = None
38
- """Description of this version."""
39
-
40
-
41
- SampleListResponse: TypeAlias = List[SampleListResponseItem]
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