codeocean 0.4.0__tar.gz → 0.5.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,9 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ ## 0.5.0 (2025-03-03)
5
+ - [#38](https://github.com/codeocean/codeocean-sdk-python/pull/38) feat: add update_permissions function for capsules
6
+
4
7
  ## 0.4.0 (2025-02-28)
5
8
  - [#35](https://github.com/codeocean/codeocean-sdk-python/pull/35) feat: Code Ocean Version 3.2 updates
6
9
  - **Minimum Code Ocean platform version updated to `3.2.0`.**
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeocean
3
- Version: 0.4.0
3
+ Version: 0.5.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.4.0"
7
+ version = "0.5.0"
8
8
  authors = [
9
9
  { name="Code Ocean", email="dev@codeocean.com" },
10
10
  ]
@@ -5,7 +5,7 @@ from dataclasses_json import dataclass_json
5
5
  from typing import Optional, Iterator
6
6
  from requests_toolbelt.sessions import BaseUrlSession
7
7
 
8
- from codeocean.components import Ownership, SortOrder, SearchFilter
8
+ from codeocean.components import Ownership, SortOrder, SearchFilter, Permissions
9
9
  from codeocean.computation import Computation
10
10
  from codeocean.data_asset import DataAssetAttachParams, DataAssetAttachResults
11
11
  from codeocean.enum import StrEnum
@@ -92,6 +92,12 @@ class Capsules:
92
92
 
93
93
  return [Computation.from_dict(c) for c in res.json()]
94
94
 
95
+ def update_permissions(self, capsule_id: str, permissions: Permissions):
96
+ self.client.post(
97
+ f"capsules/{capsule_id}/permissions",
98
+ json=permissions.to_dict(),
99
+ )
100
+
95
101
  def attach_data_assets(
96
102
  self,
97
103
  capsule_id: str,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes