kotharcomputing 1.5.0__tar.gz → 1.8.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.
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/PKG-INFO +1 -28
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/README.md +0 -27
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/pyproject.toml +1 -1
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing/_generated/operations.py +80 -0
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing/_generated/types.py +24 -1
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing.egg-info/PKG-INFO +1 -28
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/setup.cfg +0 -0
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing/__init__.py +0 -0
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing/_generated/__init__.py +0 -0
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing/aleph_language_server.py +0 -0
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing/client.py +0 -0
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing/errors.py +0 -0
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing/py.typed +0 -0
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing/transport.py +0 -0
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing.egg-info/SOURCES.txt +0 -0
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing.egg-info/dependency_links.txt +0 -0
- {kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kotharcomputing
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.8.0
|
|
4
4
|
Summary: Python SDK for the Kothar API
|
|
5
5
|
Author: Kothar Computing
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -53,30 +53,3 @@ parsed = aleph.ast('print("hello")', format=True, discover_test=True)
|
|
|
53
53
|
tests = aleph.discover_tests('test "example" {}')
|
|
54
54
|
formatted = aleph.format('print( "hello" )')
|
|
55
55
|
```
|
|
56
|
-
|
|
57
|
-
## HDF5 dataset reads
|
|
58
|
-
|
|
59
|
-
Generated operations use GET with no body and encode a nested `ranges` array as
|
|
60
|
-
one JSON query parameter. Use `[]` for scalar/null dataspaces.
|
|
61
|
-
|
|
62
|
-
```python
|
|
63
|
-
from kotharcomputing import ApiTransport
|
|
64
|
-
from kotharcomputing._generated.operations import read_file_dataset
|
|
65
|
-
|
|
66
|
-
transport = ApiTransport("https://api.kotharcomputing.com", access_token="YOUR_TOKEN")
|
|
67
|
-
response = read_file_dataset(
|
|
68
|
-
transport,
|
|
69
|
-
workspace_id="WORKSPACE_ID",
|
|
70
|
-
path="measurements.h5",
|
|
71
|
-
version_id="immutable-version-id",
|
|
72
|
-
object_path="/samples",
|
|
73
|
-
ranges=[[0, 10, 2]],
|
|
74
|
-
)
|
|
75
|
-
selection = response.json() # shape, datatype, values; optional base64 data
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Use `representation="binary"` and `response.body` for little-endian numeric/enum
|
|
79
|
-
bytes or decoded scalar-string bytes; `response.headers` preserves identity and
|
|
80
|
-
dtype metadata. Fixed-length string arrays require JSON. Enum symbols contain
|
|
81
|
-
exact decimal codes; JSON values retain the existing 64-bit tags. External callers
|
|
82
|
-
must replace POST reads with GET; stored files need no migration.
|
|
@@ -36,30 +36,3 @@ parsed = aleph.ast('print("hello")', format=True, discover_test=True)
|
|
|
36
36
|
tests = aleph.discover_tests('test "example" {}')
|
|
37
37
|
formatted = aleph.format('print( "hello" )')
|
|
38
38
|
```
|
|
39
|
-
|
|
40
|
-
## HDF5 dataset reads
|
|
41
|
-
|
|
42
|
-
Generated operations use GET with no body and encode a nested `ranges` array as
|
|
43
|
-
one JSON query parameter. Use `[]` for scalar/null dataspaces.
|
|
44
|
-
|
|
45
|
-
```python
|
|
46
|
-
from kotharcomputing import ApiTransport
|
|
47
|
-
from kotharcomputing._generated.operations import read_file_dataset
|
|
48
|
-
|
|
49
|
-
transport = ApiTransport("https://api.kotharcomputing.com", access_token="YOUR_TOKEN")
|
|
50
|
-
response = read_file_dataset(
|
|
51
|
-
transport,
|
|
52
|
-
workspace_id="WORKSPACE_ID",
|
|
53
|
-
path="measurements.h5",
|
|
54
|
-
version_id="immutable-version-id",
|
|
55
|
-
object_path="/samples",
|
|
56
|
-
ranges=[[0, 10, 2]],
|
|
57
|
-
)
|
|
58
|
-
selection = response.json() # shape, datatype, values; optional base64 data
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Use `representation="binary"` and `response.body` for little-endian numeric/enum
|
|
62
|
-
bytes or decoded scalar-string bytes; `response.headers` preserves identity and
|
|
63
|
-
dtype metadata. Fixed-length string arrays require JSON. Enum symbols contain
|
|
64
|
-
exact decimal codes; JSON values retain the existing 64-bit tags. External callers
|
|
65
|
-
must replace POST reads with GET; stored files need no migration.
|
{kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing/_generated/operations.py
RENAMED
|
@@ -1630,6 +1630,86 @@ def task_artifact_download_url(
|
|
|
1630
1630
|
return response.json()
|
|
1631
1631
|
|
|
1632
1632
|
|
|
1633
|
+
def inspect_task_artifact(
|
|
1634
|
+
transport: ApiTransport,
|
|
1635
|
+
*,
|
|
1636
|
+
workspace_id: str,
|
|
1637
|
+
task_id: str,
|
|
1638
|
+
artifact_id: str,
|
|
1639
|
+
object_path: str,
|
|
1640
|
+
attributes: bool | None = None,
|
|
1641
|
+
offset: int | None = None,
|
|
1642
|
+
limit: int | None = None,
|
|
1643
|
+
) -> Types.TaskArtifactHdf5Inspection:
|
|
1644
|
+
"""Inspect an HDF5 object in an immutable task artifact"""
|
|
1645
|
+
response = transport.raw(
|
|
1646
|
+
"get",
|
|
1647
|
+
"/v1/workspaces/{workspaceId}/tasks/{taskId}/artifacts/{artifactId}/$inspect",
|
|
1648
|
+
path_params={
|
|
1649
|
+
"workspaceId": workspace_id,
|
|
1650
|
+
"taskId": task_id,
|
|
1651
|
+
"artifactId": artifact_id,
|
|
1652
|
+
},
|
|
1653
|
+
search_params={
|
|
1654
|
+
"objectPath": object_path,
|
|
1655
|
+
"attributes": attributes,
|
|
1656
|
+
"offset": offset,
|
|
1657
|
+
"limit": limit,
|
|
1658
|
+
},
|
|
1659
|
+
)
|
|
1660
|
+
return response.json()
|
|
1661
|
+
|
|
1662
|
+
|
|
1663
|
+
def read_task_artifact_dataset(
|
|
1664
|
+
transport: ApiTransport,
|
|
1665
|
+
*,
|
|
1666
|
+
workspace_id: str,
|
|
1667
|
+
task_id: str,
|
|
1668
|
+
artifact_id: str,
|
|
1669
|
+
object_path: str,
|
|
1670
|
+
ranges: list[list[int]],
|
|
1671
|
+
representation: Literal["json", "binary"] | None = None,
|
|
1672
|
+
) -> RawResponse:
|
|
1673
|
+
"""Read a bounded HDF5 hyperslab from an immutable task artifact"""
|
|
1674
|
+
response = transport.raw(
|
|
1675
|
+
"get",
|
|
1676
|
+
"/v1/workspaces/{workspaceId}/tasks/{taskId}/artifacts/{artifactId}/$readDataset",
|
|
1677
|
+
path_params={
|
|
1678
|
+
"workspaceId": workspace_id,
|
|
1679
|
+
"taskId": task_id,
|
|
1680
|
+
"artifactId": artifact_id,
|
|
1681
|
+
},
|
|
1682
|
+
search_params={
|
|
1683
|
+
"objectPath": object_path,
|
|
1684
|
+
"ranges": json.dumps(ranges, separators=(",", ":")),
|
|
1685
|
+
"representation": representation,
|
|
1686
|
+
},
|
|
1687
|
+
)
|
|
1688
|
+
return response
|
|
1689
|
+
|
|
1690
|
+
|
|
1691
|
+
def save_task_artifact(
|
|
1692
|
+
transport: ApiTransport,
|
|
1693
|
+
*,
|
|
1694
|
+
workspace_id: str,
|
|
1695
|
+
task_id: str,
|
|
1696
|
+
artifact_id: str,
|
|
1697
|
+
body: Types.SaveTaskArtifactRequest,
|
|
1698
|
+
) -> RawResponse:
|
|
1699
|
+
"""Transfers the recorded immutable artifact to a new path in the same workspace on the server. Existing files are never overwritten. Requires task read and download permissions and create permission for the destination file."""
|
|
1700
|
+
response = transport.raw(
|
|
1701
|
+
"post",
|
|
1702
|
+
"/v1/workspaces/{workspaceId}/tasks/{taskId}/artifacts/{artifactId}/$save",
|
|
1703
|
+
path_params={
|
|
1704
|
+
"workspaceId": workspace_id,
|
|
1705
|
+
"taskId": task_id,
|
|
1706
|
+
"artifactId": artifact_id,
|
|
1707
|
+
},
|
|
1708
|
+
json_data=body,
|
|
1709
|
+
)
|
|
1710
|
+
return response
|
|
1711
|
+
|
|
1712
|
+
|
|
1633
1713
|
def list_task_executions(
|
|
1634
1714
|
transport: ApiTransport, *, workspace_id: str, task_id: str
|
|
1635
1715
|
) -> Types.TaskExecutionListResponse:
|
|
@@ -1066,6 +1066,11 @@ class RuntimeListResponse(TypedDict, total=False):
|
|
|
1066
1066
|
next: NotRequired[str]
|
|
1067
1067
|
|
|
1068
1068
|
|
|
1069
|
+
class SaveTaskArtifactRequest(TypedDict, total=False):
|
|
1070
|
+
# Relative destination path, including the file name.
|
|
1071
|
+
path: Required[str]
|
|
1072
|
+
|
|
1073
|
+
|
|
1069
1074
|
class SearchField(TypedDict, total=False):
|
|
1070
1075
|
defaultSearch: Required[bool]
|
|
1071
1076
|
description: Required[str]
|
|
@@ -1425,6 +1430,22 @@ class TaskArtifact(TypedDict, total=False):
|
|
|
1425
1430
|
taskId: Required[str]
|
|
1426
1431
|
|
|
1427
1432
|
|
|
1433
|
+
class TaskArtifactHdf5DatasetResponse(TypedDict, total=False):
|
|
1434
|
+
artifactId: Required[str]
|
|
1435
|
+
data: NotRequired[str]
|
|
1436
|
+
datatype: Required[Hdf5Datatype]
|
|
1437
|
+
dtype: Required[str]
|
|
1438
|
+
etag: Required[str]
|
|
1439
|
+
shape: Required[list[int]]
|
|
1440
|
+
values: NotRequired[list[Any]]
|
|
1441
|
+
|
|
1442
|
+
|
|
1443
|
+
class TaskArtifactHdf5Inspection(TypedDict, total=False):
|
|
1444
|
+
artifactId: Required[str]
|
|
1445
|
+
etag: Required[str]
|
|
1446
|
+
node: Required[Hdf5Object]
|
|
1447
|
+
|
|
1448
|
+
|
|
1428
1449
|
class TaskArtifactListResponse(TypedDict, total=False):
|
|
1429
1450
|
items: Required[list[TaskArtifact]]
|
|
1430
1451
|
next: NotRequired[str]
|
|
@@ -1517,7 +1538,9 @@ class TaskExecutionEvent(TypedDict, total=False):
|
|
|
1517
1538
|
createdAt: Required[str]
|
|
1518
1539
|
executionId: Required[str]
|
|
1519
1540
|
id: Required[str]
|
|
1520
|
-
kind: Required[
|
|
1541
|
+
kind: Required[
|
|
1542
|
+
Literal["lifecycle", "log", "metrics", "artifact", "finished", "kryo"]
|
|
1543
|
+
]
|
|
1521
1544
|
payload: Required[dict[str, Any]]
|
|
1522
1545
|
sequence: Required[int]
|
|
1523
1546
|
taskId: Required[str]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kotharcomputing
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.8.0
|
|
4
4
|
Summary: Python SDK for the Kothar API
|
|
5
5
|
Author: Kothar Computing
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -53,30 +53,3 @@ parsed = aleph.ast('print("hello")', format=True, discover_test=True)
|
|
|
53
53
|
tests = aleph.discover_tests('test "example" {}')
|
|
54
54
|
formatted = aleph.format('print( "hello" )')
|
|
55
55
|
```
|
|
56
|
-
|
|
57
|
-
## HDF5 dataset reads
|
|
58
|
-
|
|
59
|
-
Generated operations use GET with no body and encode a nested `ranges` array as
|
|
60
|
-
one JSON query parameter. Use `[]` for scalar/null dataspaces.
|
|
61
|
-
|
|
62
|
-
```python
|
|
63
|
-
from kotharcomputing import ApiTransport
|
|
64
|
-
from kotharcomputing._generated.operations import read_file_dataset
|
|
65
|
-
|
|
66
|
-
transport = ApiTransport("https://api.kotharcomputing.com", access_token="YOUR_TOKEN")
|
|
67
|
-
response = read_file_dataset(
|
|
68
|
-
transport,
|
|
69
|
-
workspace_id="WORKSPACE_ID",
|
|
70
|
-
path="measurements.h5",
|
|
71
|
-
version_id="immutable-version-id",
|
|
72
|
-
object_path="/samples",
|
|
73
|
-
ranges=[[0, 10, 2]],
|
|
74
|
-
)
|
|
75
|
-
selection = response.json() # shape, datatype, values; optional base64 data
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Use `representation="binary"` and `response.body` for little-endian numeric/enum
|
|
79
|
-
bytes or decoded scalar-string bytes; `response.headers` preserves identity and
|
|
80
|
-
dtype metadata. Fixed-length string arrays require JSON. Enum symbols contain
|
|
81
|
-
exact decimal codes; JSON values retain the existing 64-bit tags. External callers
|
|
82
|
-
must replace POST reads with GET; stored files need no migration.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing/aleph_language_server.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kotharcomputing-1.5.0 → kotharcomputing-1.8.0}/src/kotharcomputing.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|