codeset 0.1.0a15__tar.gz → 0.1.0a16__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.
- codeset-0.1.0a16/.release-please-manifest.json +3 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/CHANGELOG.md +8 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/PKG-INFO +1 -1
- {codeset-0.1.0a15 → codeset-0.1.0a16}/api.md +12 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/pyproject.toml +1 -1
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_client.py +9 -1
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_version.py +1 -1
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/resources/__init__.py +14 -0
- codeset-0.1.0a16/src/codeset/resources/datasets.py +135 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/__init__.py +1 -0
- codeset-0.1.0a16/src/codeset/types/dataset_list_response.py +26 -0
- codeset-0.1.0a16/tests/api_resources/test_datasets.py +80 -0
- codeset-0.1.0a15/.release-please-manifest.json +0 -3
- {codeset-0.1.0a15 → codeset-0.1.0a16}/.gitignore +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/CONTRIBUTING.md +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/LICENSE +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/README.md +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/SECURITY.md +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/bin/check-release-environment +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/bin/publish-pypi +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/examples/.keep +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/noxfile.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/release-please-config.json +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/requirements-dev.lock +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/requirements.lock +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/__init__.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_base_client.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_compat.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_constants.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_exceptions.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_files.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_models.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_qs.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_resource.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_response.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_streaming.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_types.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_utils/__init__.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_utils/_compat.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_utils/_datetime_parse.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_utils/_logs.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_utils/_proxy.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_utils/_reflection.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_utils/_resources_proxy.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_utils/_streams.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_utils/_sync.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_utils/_transform.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_utils/_typing.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/_utils/_utils.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/lib/.keep +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/py.typed +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/resources/health.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/resources/samples.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/resources/sessions/__init__.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/resources/sessions/sessions.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/resources/sessions/verify.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/container_info.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/error_info.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/health_check_response.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/sample_download_params.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/sample_list_params.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/sample_list_response.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/session.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/session_close_response.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/session_create_params.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/session_create_response.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/session_execute_command_params.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/session_execute_command_response.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/session_list_response.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/session_status.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/session_str_replace_params.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/session_str_replace_response.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/sessions/__init__.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/sessions/job_status.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/sessions/verify_start_response.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/src/codeset/types/sessions/verify_status_response.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/__init__.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/api_resources/__init__.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/api_resources/sessions/__init__.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/api_resources/sessions/test_verify.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/api_resources/test_health.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/api_resources/test_samples.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/api_resources/test_sessions.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/conftest.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/sample_file.txt +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/test_client.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/test_deepcopy.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/test_extract_files.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/test_files.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/test_models.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/test_qs.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/test_required_args.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/test_response.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/test_streaming.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/test_transform.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/test_utils/test_datetime_parse.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/test_utils/test_proxy.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/test_utils/test_typing.py +0 -0
- {codeset-0.1.0a15 → codeset-0.1.0a16}/tests/utils.py +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.16 (2025-10-12)
|
|
4
|
+
|
|
5
|
+
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)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([08bcf5d](https://github.com/codeset-ai/codeset-sdk/commit/08bcf5d5a40d12bc02556f9f7cd66213737e509b))
|
|
10
|
+
|
|
3
11
|
## 0.1.0-alpha.15 (2025-10-12)
|
|
4
12
|
|
|
5
13
|
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.
|
|
3
|
+
Version: 0.1.0a16
|
|
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:
|
|
@@ -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
|
|
|
@@ -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
|
+
)
|
|
@@ -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]
|
|
@@ -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
|
|
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
|
|
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
|