codeocean 0.3.1__tar.gz → 0.4.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.
@@ -1,6 +1,13 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ ## 0.4.0 (2025-02-28)
5
+ - [#35](https://github.com/codeocean/codeocean-sdk-python/pull/35) feat: Code Ocean Version 3.2 updates
6
+ - **Minimum Code Ocean platform version updated to `3.2.0`.**
7
+
8
+ ## 0.3.2 (2025-02-21)
9
+ - [#33](https://github.com/codeocean/codeocean-sdk-python/pull/33) feat: add iterator function for search capsule API
10
+
4
11
  ## 0.3.1 (2025-01-30)
5
12
  - [#31](https://github.com/codeocean/codeocean-sdk-python/pull/31) fix: set fields as optional fields according to openapi spec
6
13
  - [#30](https://github.com/codeocean/codeocean-sdk-python/pull/30) fix: make all DataAssetUpdateParams fields optional
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeocean
3
- Version: 0.3.1
3
+ Version: 0.4.0
4
4
  Summary: Code Ocean Python SDK
5
5
  Project-URL: Homepage, https://github.com/codeocean/codeocean-sdk-python
6
6
  Project-URL: Issues, https://github.com/codeocean/codeocean-sdk-python/issues
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "codeocean"
7
- version = "0.3.1"
7
+ version = "0.4.0"
8
8
  authors = [
9
9
  { name="Code Ocean", email="dev@codeocean.com" },
10
10
  ]
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  from dataclasses import dataclass
4
4
  from dataclasses_json import dataclass_json
5
- from typing import Optional
5
+ from typing import Optional, Iterator
6
6
  from requests_toolbelt.sessions import BaseUrlSession
7
7
 
8
8
  from codeocean.components import Ownership, SortOrder, SearchFilter
@@ -113,3 +113,18 @@ class Capsules:
113
113
  res = self.client.post("capsules/search", json=search_params.to_dict())
114
114
 
115
115
  return CapsuleSearchResults.from_dict(res.json())
116
+
117
+ def search_capsules_iterator(self, search_params: CapsuleSearchParams) -> Iterator[Capsules]:
118
+ params = search_params.to_dict()
119
+ while True:
120
+ response = self.search_capsules(
121
+ search_params=CapsuleSearchParams(**params)
122
+ )
123
+
124
+ for result in response.results:
125
+ yield result
126
+
127
+ if not response.has_more:
128
+ return
129
+
130
+ params["next_token"] = response.next_token
@@ -33,6 +33,7 @@ class Provenance:
33
33
  docker_image: Optional[str] = None
34
34
  capsule: Optional[str] = None
35
35
  data_assets: Optional[list[str]] = None
36
+ computation: Optional[str] = None
36
37
 
37
38
 
38
39
  class DataAssetOrigin(StrEnum):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes