qall-daemon-client 0.1.1__py3-none-any.whl

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.
@@ -0,0 +1,14 @@
1
+ # Copyright 2026 Scaleway
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ from qall_daemon_client.v1 import *
@@ -0,0 +1,15 @@
1
+ # Copyright 2026 Scaleway
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ from .client import *
15
+ from .objects import *
@@ -0,0 +1,15 @@
1
+ # Copyright 2026 Scaleway
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ from .base import DaemonClient
15
+ from .grpc_client import GrpcDaemonClient
@@ -0,0 +1,66 @@
1
+ # Copyright 2026 Scaleway
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ from __future__ import annotations
15
+
16
+ from abc import ABC
17
+ from typing import Optional
18
+
19
+ from qall_daemon_client.v1.objects import DaemonInfo, TaskRun, Artifact, WorkerEntry
20
+
21
+
22
+ class DaemonClient(ABC):
23
+
24
+ def __enter__(self):
25
+ raise NotImplementedError
26
+
27
+ def __exit__(self, exc_type, exc_val, exc_tb):
28
+ raise NotImplementedError
29
+
30
+ def get_service_info(self) -> DaemonInfo:
31
+ raise NotImplementedError
32
+
33
+ def create_task_run(
34
+ self,
35
+ task_hash: str,
36
+ artifact_hash: Optional[str] = None,
37
+ parent_task_run_id: Optional[str] = None,
38
+ ) -> TaskRun:
39
+ raise NotImplementedError
40
+
41
+ def get_task_run(self, task_run_id: str) -> TaskRun:
42
+ raise NotImplementedError
43
+
44
+ def create_worker_entry(
45
+ self, worker_hash: str, worker_provider: str, input_format: str
46
+ ) -> WorkerEntry:
47
+ raise NotImplementedError
48
+
49
+ def create_artifact(
50
+ self,
51
+ task_run_id: str,
52
+ payload: bytes,
53
+ ) -> Artifact:
54
+ raise NotImplementedError
55
+
56
+ def download_artifact(self, artifact_hash: str) -> bytes:
57
+ raise NotImplementedError
58
+
59
+ def list_artifacts(self, task_run_id: str) -> list[Artifact]:
60
+ raise NotImplementedError
61
+
62
+ def is_up(self) -> bool:
63
+ try:
64
+ return self.get_service_info() is not None
65
+ except:
66
+ return False
@@ -0,0 +1,173 @@
1
+ # Copyright 2026 Scaleway
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ from __future__ import annotations
15
+ from pathlib import Path
16
+
17
+ import grpc
18
+ import time
19
+
20
+ from typing import Optional
21
+
22
+ from google.protobuf import empty_pb2
23
+
24
+ from qall_daemon_client.v1.client.protobuf.daemon_runtime_api_v1 import (
25
+ daemon_runtime_api_v1_pb2 as pb2,
26
+ )
27
+ from qall_daemon_client.v1.client.protobuf.daemon_runtime_api_v1 import (
28
+ daemon_runtime_api_v1_pb2_grpc as pb2_grpc,
29
+ )
30
+ from qall_daemon_client.v1.objects import (
31
+ Artifact,
32
+ DaemonInfo,
33
+ TaskRun,
34
+ TaskRunStatus,
35
+ WorkerEntry,
36
+ )
37
+
38
+ from .base import DaemonClient
39
+
40
+
41
+ class GrpcDaemonClient(DaemonClient):
42
+ """
43
+ gRPC client for Daemon requests.
44
+ """
45
+
46
+ def __init__(
47
+ self,
48
+ url: str = "localhost:50053",
49
+ token: Optional[str] = None,
50
+ local_unified_fs: str = "/tmp/qall_unifs",
51
+ ):
52
+ self.__url = url
53
+ self.__channel: Optional[grpc.Channel] = None
54
+ self.__stub: Optional[pb2_grpc.ApiStub] = None
55
+ self.__token = token
56
+ self.__unifs = Path(local_unified_fs)
57
+
58
+ if not self.__unifs.exists():
59
+ self.__unifs.mkdir(mode=0o774, parents=True)
60
+ self.__unifs.chmod(0o774)
61
+
62
+ def __enter__(self):
63
+ self.connect()
64
+ return self
65
+
66
+ def __exit__(self, exc_type, exc_val, exc_tb):
67
+ self.close()
68
+
69
+ def connect(self):
70
+ self.__channel = grpc.insecure_channel(self.__url)
71
+ self.__stub = pb2_grpc.ApiStub(self.__channel)
72
+
73
+ def close(self):
74
+ if self.__channel:
75
+ self.__channel.close()
76
+ self.__channel = None
77
+ self.__stub = None
78
+
79
+ def get_service_info(self) -> DaemonInfo:
80
+ request = empty_pb2.Empty()
81
+ response = self.__stub.GetServiceInfo(request)
82
+
83
+ return DaemonInfo(name=response.name, version=response.version)
84
+
85
+ def create_worker_entry(
86
+ self, worker_hash: str, worker_provider: str, input_format: str
87
+ ) -> WorkerEntry:
88
+ request = pb2.CreateWorkerEntryRequest(
89
+ worker_hash=worker_hash,
90
+ provider=worker_provider,
91
+ input_format=input_format,
92
+ )
93
+
94
+ response = self.__stub.CreateWorkerEntry(request)
95
+
96
+ return WorkerEntry(
97
+ hash=response.hash,
98
+ provider=response.provider,
99
+ input_format=response.input_format,
100
+ )
101
+
102
+ def create_task_run(
103
+ self,
104
+ task_hash: str,
105
+ artifact_hash: Optional[str] = None,
106
+ parent_task_run_id: Optional[str] = None,
107
+ ) -> TaskRun:
108
+ request = pb2.CreateTaskRunRequest(
109
+ task_hash=task_hash,
110
+ artifact_hash=artifact_hash or "",
111
+ )
112
+ response = self.__stub.CreateTaskRun(request)
113
+
114
+ return TaskRun(id=response.id, status=TaskRunStatus(response.status))
115
+
116
+ def get_task_run(self, task_run_id: str) -> TaskRun:
117
+ request = pb2.GetTaskRunRequest(task_run_id=task_run_id)
118
+ response = self.__stub.GetTaskRun(request)
119
+
120
+ return TaskRun(id=response.id, status=TaskRunStatus(response.status))
121
+
122
+ def wait_for_task_run(
123
+ self,
124
+ task_run_id: str,
125
+ timeout: float = 300.0,
126
+ poll_interval: float = 1.0,
127
+ ) -> TaskRun:
128
+ """
129
+ Blocking call to wait for a task run to end, meaning its status becomes either DONE or ERROR.
130
+ """
131
+
132
+ start_time = time.time()
133
+ while time.time() - start_time < timeout:
134
+ task_run = self.get_task_run(task_run_id)
135
+
136
+ if task_run.status in (TaskRunStatus.DONE, TaskRunStatus.ERROR):
137
+ return task_run
138
+
139
+ time.sleep(poll_interval)
140
+ raise TimeoutError(
141
+ f"Task run {task_run_id} did not complete within {timeout} seconds"
142
+ )
143
+
144
+ def create_artifact(
145
+ self,
146
+ task_run_id: str,
147
+ payload: bytes,
148
+ ) -> Artifact:
149
+ request = pb2.CreateArtifactRequest(
150
+ task_run_id=task_run_id,
151
+ payload=payload,
152
+ )
153
+
154
+ grpc_metadata = (("x-qall-token", self.__token),)
155
+
156
+ response = self.__stub.CreateArtifact(
157
+ request,
158
+ metadata=grpc_metadata,
159
+ )
160
+
161
+ return Artifact(hash=response.hash)
162
+
163
+ def download_artifact(self, artifact_hash: str) -> bytes:
164
+ request = pb2.DownloadArtifactRequest(artifact_hash=artifact_hash)
165
+ response = self.__stub.DownloadArtifact(request)
166
+
167
+ return response.payload
168
+
169
+ def list_artifacts(self, task_run_id: str) -> list[Artifact]:
170
+ request = pb2.ListArtifactsRequest(task_run_id=task_run_id)
171
+ response = self.__stub.ListArtifacts(request)
172
+
173
+ return [Artifact(hash=a.hash) for a in response.artifacts]
@@ -0,0 +1,99 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: daemon-runtime-api-v1.proto
5
+ # Protobuf Python Version: 5.29.0
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+
13
+ _runtime_version.ValidateProtobufRuntimeVersion(
14
+ _runtime_version.Domain.PUBLIC, 5, 29, 0, "", "daemon-runtime-api-v1.proto"
15
+ )
16
+ # @@protoc_insertion_point(imports)
17
+
18
+ _sym_db = _symbol_database.Default()
19
+
20
+
21
+ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
22
+ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
23
+
24
+
25
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
26
+ b'\n\x1b\x64\x61\x65mon-runtime-api-v1.proto\x12\x15\x64\x61\x65mon_runtime_api_v1\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/api/annotations.proto"=\n\nDaemonInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08provider\x18\x03 \x01(\t"W\n\x18\x43reateWorkerEntryRequest\x12\x13\n\x0bworker_hash\x18\x01 \x01(\t\x12\x10\n\x08provider\x18\x02 \x01(\t\x12\x14\n\x0cinput_format\x18\x03 \x01(\t"@\n\x14\x43reateTaskRunRequest\x12\x11\n\ttask_hash\x18\x01 \x01(\t\x12\x15\n\rartifact_hash\x18\x02 \x01(\t"\x92\x01\n\x07TaskRun\x12\n\n\x02id\x18\x01 \x01(\t\x12\x35\n\x06status\x18\x02 \x01(\x0e\x32%.daemon_runtime_api_v1.TaskRun.Status"D\n\x06Status\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\t\n\x05\x45RROR\x10\x04"(\n\x11GetTaskRunRequest\x12\x13\n\x0btask_run_id\x18\x01 \x01(\t"=\n\x15\x43reateArtifactRequest\x12\x13\n\x0btask_run_id\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\x0c"+\n\x14ListArtifactsRequest\x12\x13\n\x0btask_run_id\x18\x01 \x01(\t"0\n\x17\x44ownloadArtifactRequest\x12\x15\n\rartifact_hash\x18\x01 \x01(\t"\x18\n\x08\x41rtifact\x12\x0c\n\x04hash\x18\x01 \x01(\t""\n\x0f\x41rtifactPayload\x12\x0f\n\x07payload\x18\x01 \x01(\x0c"K\n\x15ListArtifactsResponse\x12\x32\n\tartifacts\x18\x01 \x03(\x0b\x32\x1f.daemon_runtime_api_v1.Artifact"C\n\x0bWorkerEntry\x12\x0c\n\x04hash\x18\x01 \x01(\t\x12\x10\n\x08provider\x18\x02 \x01(\t\x12\x14\n\x0cinput_format\x18\x03 \x01(\t2\xeb\x06\n\x03\x41pi\x12X\n\x0eGetServiceInfo\x12\x16.google.protobuf.Empty\x1a!.daemon_runtime_api_v1.DaemonInfo"\x0b\x82\xd3\xe4\x93\x02\x05\x12\x03/v1\x12\x80\x01\n\x11\x43reateWorkerEntry\x12/.daemon_runtime_api_v1.CreateWorkerEntryRequest\x1a".daemon_runtime_api_v1.WorkerEntry"\x16\x82\xd3\xe4\x93\x02\x10"\x0b/v1/workers:\x01*\x12v\n\rCreateTaskRun\x12+.daemon_runtime_api_v1.CreateTaskRunRequest\x1a\x1e.daemon_runtime_api_v1.TaskRun"\x18\x82\xd3\xe4\x93\x02\x12"\r/v1/task_runs:\x01*\x12|\n\nGetTaskRun\x12(.daemon_runtime_api_v1.GetTaskRunRequest\x1a\x1e.daemon_runtime_api_v1.TaskRun"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/tasks_runs/{task_run_id}\x12y\n\x0e\x43reateArtifact\x12,.daemon_runtime_api_v1.CreateArtifactRequest\x1a\x1f.daemon_runtime_api_v1.Artifact"\x18\x82\xd3\xe4\x93\x02\x12"\r/v1/artifacts:\x01*\x12\x91\x01\n\x10\x44ownloadArtifact\x12..daemon_runtime_api_v1.DownloadArtifactRequest\x1a&.daemon_runtime_api_v1.ArtifactPayload"%\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/artifacts/{artifact_hash}\x12\x81\x01\n\rListArtifacts\x12+.daemon_runtime_api_v1.ListArtifactsRequest\x1a,.daemon_runtime_api_v1.ListArtifactsResponse"\x15\x82\xd3\xe4\x93\x02\x0f\x12\r/v1/artifactsB0Z.internal/server/protobuf/daemon_runtime_api_v1b\x06proto3'
27
+ )
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(
32
+ DESCRIPTOR, "daemon_runtime_api_v1_pb2", _globals
33
+ )
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ _globals["DESCRIPTOR"]._loaded_options = None
36
+ _globals["DESCRIPTOR"]._serialized_options = (
37
+ b"Z.internal/server/protobuf/daemon_runtime_api_v1"
38
+ )
39
+ _globals["_API"].methods_by_name["GetServiceInfo"]._loaded_options = None
40
+ _globals["_API"].methods_by_name[
41
+ "GetServiceInfo"
42
+ ]._serialized_options = b"\202\323\344\223\002\005\022\003/v1"
43
+ _globals["_API"].methods_by_name["CreateWorkerEntry"]._loaded_options = None
44
+ _globals["_API"].methods_by_name[
45
+ "CreateWorkerEntry"
46
+ ]._serialized_options = b'\202\323\344\223\002\020"\013/v1/workers:\001*'
47
+ _globals["_API"].methods_by_name["CreateTaskRun"]._loaded_options = None
48
+ _globals["_API"].methods_by_name[
49
+ "CreateTaskRun"
50
+ ]._serialized_options = b'\202\323\344\223\002\022"\r/v1/task_runs:\001*'
51
+ _globals["_API"].methods_by_name["GetTaskRun"]._loaded_options = None
52
+ _globals["_API"].methods_by_name[
53
+ "GetTaskRun"
54
+ ]._serialized_options = (
55
+ b"\202\323\344\223\002\036\022\034/v1/tasks_runs/{task_run_id}"
56
+ )
57
+ _globals["_API"].methods_by_name["CreateArtifact"]._loaded_options = None
58
+ _globals["_API"].methods_by_name[
59
+ "CreateArtifact"
60
+ ]._serialized_options = b'\202\323\344\223\002\022"\r/v1/artifacts:\001*'
61
+ _globals["_API"].methods_by_name["DownloadArtifact"]._loaded_options = None
62
+ _globals["_API"].methods_by_name[
63
+ "DownloadArtifact"
64
+ ]._serialized_options = (
65
+ b"\202\323\344\223\002\037\022\035/v1/artifacts/{artifact_hash}"
66
+ )
67
+ _globals["_API"].methods_by_name["ListArtifacts"]._loaded_options = None
68
+ _globals["_API"].methods_by_name[
69
+ "ListArtifacts"
70
+ ]._serialized_options = b"\202\323\344\223\002\017\022\r/v1/artifacts"
71
+ _globals["_DAEMONINFO"]._serialized_start = 113
72
+ _globals["_DAEMONINFO"]._serialized_end = 174
73
+ _globals["_CREATEWORKERENTRYREQUEST"]._serialized_start = 176
74
+ _globals["_CREATEWORKERENTRYREQUEST"]._serialized_end = 263
75
+ _globals["_CREATETASKRUNREQUEST"]._serialized_start = 265
76
+ _globals["_CREATETASKRUNREQUEST"]._serialized_end = 329
77
+ _globals["_TASKRUN"]._serialized_start = 332
78
+ _globals["_TASKRUN"]._serialized_end = 478
79
+ _globals["_TASKRUN_STATUS"]._serialized_start = 410
80
+ _globals["_TASKRUN_STATUS"]._serialized_end = 478
81
+ _globals["_GETTASKRUNREQUEST"]._serialized_start = 480
82
+ _globals["_GETTASKRUNREQUEST"]._serialized_end = 520
83
+ _globals["_CREATEARTIFACTREQUEST"]._serialized_start = 522
84
+ _globals["_CREATEARTIFACTREQUEST"]._serialized_end = 583
85
+ _globals["_LISTARTIFACTSREQUEST"]._serialized_start = 585
86
+ _globals["_LISTARTIFACTSREQUEST"]._serialized_end = 628
87
+ _globals["_DOWNLOADARTIFACTREQUEST"]._serialized_start = 630
88
+ _globals["_DOWNLOADARTIFACTREQUEST"]._serialized_end = 678
89
+ _globals["_ARTIFACT"]._serialized_start = 680
90
+ _globals["_ARTIFACT"]._serialized_end = 704
91
+ _globals["_ARTIFACTPAYLOAD"]._serialized_start = 706
92
+ _globals["_ARTIFACTPAYLOAD"]._serialized_end = 740
93
+ _globals["_LISTARTIFACTSRESPONSE"]._serialized_start = 742
94
+ _globals["_LISTARTIFACTSRESPONSE"]._serialized_end = 817
95
+ _globals["_WORKERENTRY"]._serialized_start = 819
96
+ _globals["_WORKERENTRY"]._serialized_end = 886
97
+ _globals["_API"]._serialized_start = 889
98
+ _globals["_API"]._serialized_end = 1764
99
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,144 @@
1
+ from google.protobuf import empty_pb2 as _empty_pb2
2
+ from google.api import annotations_pb2 as _annotations_pb2
3
+ from google.protobuf.internal import containers as _containers
4
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import message as _message
7
+ from typing import (
8
+ ClassVar as _ClassVar,
9
+ Iterable as _Iterable,
10
+ Mapping as _Mapping,
11
+ Optional as _Optional,
12
+ Union as _Union,
13
+ )
14
+
15
+ DESCRIPTOR: _descriptor.FileDescriptor
16
+
17
+ class DaemonInfo(_message.Message):
18
+ __slots__ = ("name", "version", "provider")
19
+ NAME_FIELD_NUMBER: _ClassVar[int]
20
+ VERSION_FIELD_NUMBER: _ClassVar[int]
21
+ PROVIDER_FIELD_NUMBER: _ClassVar[int]
22
+ name: str
23
+ version: str
24
+ provider: str
25
+ def __init__(
26
+ self,
27
+ name: _Optional[str] = ...,
28
+ version: _Optional[str] = ...,
29
+ provider: _Optional[str] = ...,
30
+ ) -> None: ...
31
+
32
+ class CreateWorkerEntryRequest(_message.Message):
33
+ __slots__ = ("worker_hash", "provider", "input_format")
34
+ WORKER_HASH_FIELD_NUMBER: _ClassVar[int]
35
+ PROVIDER_FIELD_NUMBER: _ClassVar[int]
36
+ INPUT_FORMAT_FIELD_NUMBER: _ClassVar[int]
37
+ worker_hash: str
38
+ provider: str
39
+ input_format: str
40
+ def __init__(
41
+ self,
42
+ worker_hash: _Optional[str] = ...,
43
+ provider: _Optional[str] = ...,
44
+ input_format: _Optional[str] = ...,
45
+ ) -> None: ...
46
+
47
+ class CreateTaskRunRequest(_message.Message):
48
+ __slots__ = ("task_hash", "artifact_hash")
49
+ TASK_HASH_FIELD_NUMBER: _ClassVar[int]
50
+ ARTIFACT_HASH_FIELD_NUMBER: _ClassVar[int]
51
+ task_hash: str
52
+ artifact_hash: str
53
+ def __init__(
54
+ self, task_hash: _Optional[str] = ..., artifact_hash: _Optional[str] = ...
55
+ ) -> None: ...
56
+
57
+ class TaskRun(_message.Message):
58
+ __slots__ = ("id", "status")
59
+
60
+ class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
61
+ __slots__ = ()
62
+ UNKNOWN: _ClassVar[TaskRun.Status]
63
+ PENDING: _ClassVar[TaskRun.Status]
64
+ RUNNING: _ClassVar[TaskRun.Status]
65
+ DONE: _ClassVar[TaskRun.Status]
66
+ ERROR: _ClassVar[TaskRun.Status]
67
+
68
+ UNKNOWN: TaskRun.Status
69
+ PENDING: TaskRun.Status
70
+ RUNNING: TaskRun.Status
71
+ DONE: TaskRun.Status
72
+ ERROR: TaskRun.Status
73
+ ID_FIELD_NUMBER: _ClassVar[int]
74
+ STATUS_FIELD_NUMBER: _ClassVar[int]
75
+ id: str
76
+ status: TaskRun.Status
77
+ def __init__(
78
+ self,
79
+ id: _Optional[str] = ...,
80
+ status: _Optional[_Union[TaskRun.Status, str]] = ...,
81
+ ) -> None: ...
82
+
83
+ class GetTaskRunRequest(_message.Message):
84
+ __slots__ = ("task_run_id",)
85
+ TASK_RUN_ID_FIELD_NUMBER: _ClassVar[int]
86
+ task_run_id: str
87
+ def __init__(self, task_run_id: _Optional[str] = ...) -> None: ...
88
+
89
+ class CreateArtifactRequest(_message.Message):
90
+ __slots__ = ("task_run_id", "payload")
91
+ TASK_RUN_ID_FIELD_NUMBER: _ClassVar[int]
92
+ PAYLOAD_FIELD_NUMBER: _ClassVar[int]
93
+ task_run_id: str
94
+ payload: bytes
95
+ def __init__(
96
+ self, task_run_id: _Optional[str] = ..., payload: _Optional[bytes] = ...
97
+ ) -> None: ...
98
+
99
+ class ListArtifactsRequest(_message.Message):
100
+ __slots__ = ("task_run_id",)
101
+ TASK_RUN_ID_FIELD_NUMBER: _ClassVar[int]
102
+ task_run_id: str
103
+ def __init__(self, task_run_id: _Optional[str] = ...) -> None: ...
104
+
105
+ class DownloadArtifactRequest(_message.Message):
106
+ __slots__ = ("artifact_hash",)
107
+ ARTIFACT_HASH_FIELD_NUMBER: _ClassVar[int]
108
+ artifact_hash: str
109
+ def __init__(self, artifact_hash: _Optional[str] = ...) -> None: ...
110
+
111
+ class Artifact(_message.Message):
112
+ __slots__ = ("hash",)
113
+ HASH_FIELD_NUMBER: _ClassVar[int]
114
+ hash: str
115
+ def __init__(self, hash: _Optional[str] = ...) -> None: ...
116
+
117
+ class ArtifactPayload(_message.Message):
118
+ __slots__ = ("payload",)
119
+ PAYLOAD_FIELD_NUMBER: _ClassVar[int]
120
+ payload: bytes
121
+ def __init__(self, payload: _Optional[bytes] = ...) -> None: ...
122
+
123
+ class ListArtifactsResponse(_message.Message):
124
+ __slots__ = ("artifacts",)
125
+ ARTIFACTS_FIELD_NUMBER: _ClassVar[int]
126
+ artifacts: _containers.RepeatedCompositeFieldContainer[Artifact]
127
+ def __init__(
128
+ self, artifacts: _Optional[_Iterable[_Union[Artifact, _Mapping]]] = ...
129
+ ) -> None: ...
130
+
131
+ class WorkerEntry(_message.Message):
132
+ __slots__ = ("hash", "provider", "input_format")
133
+ HASH_FIELD_NUMBER: _ClassVar[int]
134
+ PROVIDER_FIELD_NUMBER: _ClassVar[int]
135
+ INPUT_FORMAT_FIELD_NUMBER: _ClassVar[int]
136
+ hash: str
137
+ provider: str
138
+ input_format: str
139
+ def __init__(
140
+ self,
141
+ hash: _Optional[str] = ...,
142
+ provider: _Optional[str] = ...,
143
+ input_format: _Optional[str] = ...,
144
+ ) -> None: ...
@@ -0,0 +1,390 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+ import qall_daemon_client.v1.client.protobuf.daemon_runtime_api_v1.daemon_runtime_api_v1_pb2 as daemon__runtime__api__v1__pb2
7
+ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
8
+
9
+ GRPC_GENERATED_VERSION = "1.71.0"
10
+ GRPC_VERSION = grpc.__version__
11
+ _version_not_supported = False
12
+
13
+ try:
14
+ from grpc._utilities import first_version_is_lower
15
+
16
+ _version_not_supported = first_version_is_lower(
17
+ GRPC_VERSION, GRPC_GENERATED_VERSION
18
+ )
19
+ except ImportError:
20
+ _version_not_supported = True
21
+
22
+ if _version_not_supported:
23
+ raise RuntimeError(
24
+ f"The grpc package installed is at version {GRPC_VERSION},"
25
+ + f" but the generated code in daemon_runtime_api_v1_pb2_grpc.py depends on"
26
+ + f" grpcio>={GRPC_GENERATED_VERSION}."
27
+ + f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}"
28
+ + f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}."
29
+ )
30
+
31
+
32
+ class ApiStub(object):
33
+ """Missing associated documentation comment in .proto file."""
34
+
35
+ def __init__(self, channel):
36
+ """Constructor.
37
+
38
+ Args:
39
+ channel: A grpc.Channel.
40
+ """
41
+ self.GetServiceInfo = channel.unary_unary(
42
+ "/daemon_runtime_api_v1.Api/GetServiceInfo",
43
+ request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
44
+ response_deserializer=daemon__runtime__api__v1__pb2.DaemonInfo.FromString,
45
+ _registered_method=True,
46
+ )
47
+ self.CreateWorkerEntry = channel.unary_unary(
48
+ "/daemon_runtime_api_v1.Api/CreateWorkerEntry",
49
+ request_serializer=daemon__runtime__api__v1__pb2.CreateWorkerEntryRequest.SerializeToString,
50
+ response_deserializer=daemon__runtime__api__v1__pb2.WorkerEntry.FromString,
51
+ _registered_method=True,
52
+ )
53
+ self.CreateTaskRun = channel.unary_unary(
54
+ "/daemon_runtime_api_v1.Api/CreateTaskRun",
55
+ request_serializer=daemon__runtime__api__v1__pb2.CreateTaskRunRequest.SerializeToString,
56
+ response_deserializer=daemon__runtime__api__v1__pb2.TaskRun.FromString,
57
+ _registered_method=True,
58
+ )
59
+ self.GetTaskRun = channel.unary_unary(
60
+ "/daemon_runtime_api_v1.Api/GetTaskRun",
61
+ request_serializer=daemon__runtime__api__v1__pb2.GetTaskRunRequest.SerializeToString,
62
+ response_deserializer=daemon__runtime__api__v1__pb2.TaskRun.FromString,
63
+ _registered_method=True,
64
+ )
65
+ self.CreateArtifact = channel.unary_unary(
66
+ "/daemon_runtime_api_v1.Api/CreateArtifact",
67
+ request_serializer=daemon__runtime__api__v1__pb2.CreateArtifactRequest.SerializeToString,
68
+ response_deserializer=daemon__runtime__api__v1__pb2.Artifact.FromString,
69
+ _registered_method=True,
70
+ )
71
+ self.DownloadArtifact = channel.unary_unary(
72
+ "/daemon_runtime_api_v1.Api/DownloadArtifact",
73
+ request_serializer=daemon__runtime__api__v1__pb2.DownloadArtifactRequest.SerializeToString,
74
+ response_deserializer=daemon__runtime__api__v1__pb2.ArtifactPayload.FromString,
75
+ _registered_method=True,
76
+ )
77
+ self.ListArtifacts = channel.unary_unary(
78
+ "/daemon_runtime_api_v1.Api/ListArtifacts",
79
+ request_serializer=daemon__runtime__api__v1__pb2.ListArtifactsRequest.SerializeToString,
80
+ response_deserializer=daemon__runtime__api__v1__pb2.ListArtifactsResponse.FromString,
81
+ _registered_method=True,
82
+ )
83
+
84
+
85
+ class ApiServicer(object):
86
+ """Missing associated documentation comment in .proto file."""
87
+
88
+ def GetServiceInfo(self, request, context):
89
+ """Missing associated documentation comment in .proto file."""
90
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
91
+ context.set_details("Method not implemented!")
92
+ raise NotImplementedError("Method not implemented!")
93
+
94
+ def CreateWorkerEntry(self, request, context):
95
+ """Missing associated documentation comment in .proto file."""
96
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
97
+ context.set_details("Method not implemented!")
98
+ raise NotImplementedError("Method not implemented!")
99
+
100
+ def CreateTaskRun(self, request, context):
101
+ """Missing associated documentation comment in .proto file."""
102
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
103
+ context.set_details("Method not implemented!")
104
+ raise NotImplementedError("Method not implemented!")
105
+
106
+ def GetTaskRun(self, request, context):
107
+ """Missing associated documentation comment in .proto file."""
108
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
109
+ context.set_details("Method not implemented!")
110
+ raise NotImplementedError("Method not implemented!")
111
+
112
+ def CreateArtifact(self, request, context):
113
+ """Missing associated documentation comment in .proto file."""
114
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
115
+ context.set_details("Method not implemented!")
116
+ raise NotImplementedError("Method not implemented!")
117
+
118
+ def DownloadArtifact(self, request, context):
119
+ """Missing associated documentation comment in .proto file."""
120
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
121
+ context.set_details("Method not implemented!")
122
+ raise NotImplementedError("Method not implemented!")
123
+
124
+ def ListArtifacts(self, request, context):
125
+ """Missing associated documentation comment in .proto file."""
126
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
127
+ context.set_details("Method not implemented!")
128
+ raise NotImplementedError("Method not implemented!")
129
+
130
+
131
+ def add_ApiServicer_to_server(servicer, server):
132
+ rpc_method_handlers = {
133
+ "GetServiceInfo": grpc.unary_unary_rpc_method_handler(
134
+ servicer.GetServiceInfo,
135
+ request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
136
+ response_serializer=daemon__runtime__api__v1__pb2.DaemonInfo.SerializeToString,
137
+ ),
138
+ "CreateWorkerEntry": grpc.unary_unary_rpc_method_handler(
139
+ servicer.CreateWorkerEntry,
140
+ request_deserializer=daemon__runtime__api__v1__pb2.CreateWorkerEntryRequest.FromString,
141
+ response_serializer=daemon__runtime__api__v1__pb2.WorkerEntry.SerializeToString,
142
+ ),
143
+ "CreateTaskRun": grpc.unary_unary_rpc_method_handler(
144
+ servicer.CreateTaskRun,
145
+ request_deserializer=daemon__runtime__api__v1__pb2.CreateTaskRunRequest.FromString,
146
+ response_serializer=daemon__runtime__api__v1__pb2.TaskRun.SerializeToString,
147
+ ),
148
+ "GetTaskRun": grpc.unary_unary_rpc_method_handler(
149
+ servicer.GetTaskRun,
150
+ request_deserializer=daemon__runtime__api__v1__pb2.GetTaskRunRequest.FromString,
151
+ response_serializer=daemon__runtime__api__v1__pb2.TaskRun.SerializeToString,
152
+ ),
153
+ "CreateArtifact": grpc.unary_unary_rpc_method_handler(
154
+ servicer.CreateArtifact,
155
+ request_deserializer=daemon__runtime__api__v1__pb2.CreateArtifactRequest.FromString,
156
+ response_serializer=daemon__runtime__api__v1__pb2.Artifact.SerializeToString,
157
+ ),
158
+ "DownloadArtifact": grpc.unary_unary_rpc_method_handler(
159
+ servicer.DownloadArtifact,
160
+ request_deserializer=daemon__runtime__api__v1__pb2.DownloadArtifactRequest.FromString,
161
+ response_serializer=daemon__runtime__api__v1__pb2.ArtifactPayload.SerializeToString,
162
+ ),
163
+ "ListArtifacts": grpc.unary_unary_rpc_method_handler(
164
+ servicer.ListArtifacts,
165
+ request_deserializer=daemon__runtime__api__v1__pb2.ListArtifactsRequest.FromString,
166
+ response_serializer=daemon__runtime__api__v1__pb2.ListArtifactsResponse.SerializeToString,
167
+ ),
168
+ }
169
+ generic_handler = grpc.method_handlers_generic_handler(
170
+ "daemon_runtime_api_v1.Api", rpc_method_handlers
171
+ )
172
+ server.add_generic_rpc_handlers((generic_handler,))
173
+ server.add_registered_method_handlers(
174
+ "daemon_runtime_api_v1.Api", rpc_method_handlers
175
+ )
176
+
177
+
178
+ # This class is part of an EXPERIMENTAL API.
179
+ class Api(object):
180
+ """Missing associated documentation comment in .proto file."""
181
+
182
+ @staticmethod
183
+ def GetServiceInfo(
184
+ request,
185
+ target,
186
+ options=(),
187
+ channel_credentials=None,
188
+ call_credentials=None,
189
+ insecure=False,
190
+ compression=None,
191
+ wait_for_ready=None,
192
+ timeout=None,
193
+ metadata=None,
194
+ ):
195
+ return grpc.experimental.unary_unary(
196
+ request,
197
+ target,
198
+ "/daemon_runtime_api_v1.Api/GetServiceInfo",
199
+ google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
200
+ daemon__runtime__api__v1__pb2.DaemonInfo.FromString,
201
+ options,
202
+ channel_credentials,
203
+ insecure,
204
+ call_credentials,
205
+ compression,
206
+ wait_for_ready,
207
+ timeout,
208
+ metadata,
209
+ _registered_method=True,
210
+ )
211
+
212
+ @staticmethod
213
+ def CreateWorkerEntry(
214
+ request,
215
+ target,
216
+ options=(),
217
+ channel_credentials=None,
218
+ call_credentials=None,
219
+ insecure=False,
220
+ compression=None,
221
+ wait_for_ready=None,
222
+ timeout=None,
223
+ metadata=None,
224
+ ):
225
+ return grpc.experimental.unary_unary(
226
+ request,
227
+ target,
228
+ "/daemon_runtime_api_v1.Api/CreateWorkerEntry",
229
+ daemon__runtime__api__v1__pb2.CreateWorkerEntryRequest.SerializeToString,
230
+ daemon__runtime__api__v1__pb2.WorkerEntry.FromString,
231
+ options,
232
+ channel_credentials,
233
+ insecure,
234
+ call_credentials,
235
+ compression,
236
+ wait_for_ready,
237
+ timeout,
238
+ metadata,
239
+ _registered_method=True,
240
+ )
241
+
242
+ @staticmethod
243
+ def CreateTaskRun(
244
+ request,
245
+ target,
246
+ options=(),
247
+ channel_credentials=None,
248
+ call_credentials=None,
249
+ insecure=False,
250
+ compression=None,
251
+ wait_for_ready=None,
252
+ timeout=None,
253
+ metadata=None,
254
+ ):
255
+ return grpc.experimental.unary_unary(
256
+ request,
257
+ target,
258
+ "/daemon_runtime_api_v1.Api/CreateTaskRun",
259
+ daemon__runtime__api__v1__pb2.CreateTaskRunRequest.SerializeToString,
260
+ daemon__runtime__api__v1__pb2.TaskRun.FromString,
261
+ options,
262
+ channel_credentials,
263
+ insecure,
264
+ call_credentials,
265
+ compression,
266
+ wait_for_ready,
267
+ timeout,
268
+ metadata,
269
+ _registered_method=True,
270
+ )
271
+
272
+ @staticmethod
273
+ def GetTaskRun(
274
+ request,
275
+ target,
276
+ options=(),
277
+ channel_credentials=None,
278
+ call_credentials=None,
279
+ insecure=False,
280
+ compression=None,
281
+ wait_for_ready=None,
282
+ timeout=None,
283
+ metadata=None,
284
+ ):
285
+ return grpc.experimental.unary_unary(
286
+ request,
287
+ target,
288
+ "/daemon_runtime_api_v1.Api/GetTaskRun",
289
+ daemon__runtime__api__v1__pb2.GetTaskRunRequest.SerializeToString,
290
+ daemon__runtime__api__v1__pb2.TaskRun.FromString,
291
+ options,
292
+ channel_credentials,
293
+ insecure,
294
+ call_credentials,
295
+ compression,
296
+ wait_for_ready,
297
+ timeout,
298
+ metadata,
299
+ _registered_method=True,
300
+ )
301
+
302
+ @staticmethod
303
+ def CreateArtifact(
304
+ request,
305
+ target,
306
+ options=(),
307
+ channel_credentials=None,
308
+ call_credentials=None,
309
+ insecure=False,
310
+ compression=None,
311
+ wait_for_ready=None,
312
+ timeout=None,
313
+ metadata=None,
314
+ ):
315
+ return grpc.experimental.unary_unary(
316
+ request,
317
+ target,
318
+ "/daemon_runtime_api_v1.Api/CreateArtifact",
319
+ daemon__runtime__api__v1__pb2.CreateArtifactRequest.SerializeToString,
320
+ daemon__runtime__api__v1__pb2.Artifact.FromString,
321
+ options,
322
+ channel_credentials,
323
+ insecure,
324
+ call_credentials,
325
+ compression,
326
+ wait_for_ready,
327
+ timeout,
328
+ metadata,
329
+ _registered_method=True,
330
+ )
331
+
332
+ @staticmethod
333
+ def DownloadArtifact(
334
+ request,
335
+ target,
336
+ options=(),
337
+ channel_credentials=None,
338
+ call_credentials=None,
339
+ insecure=False,
340
+ compression=None,
341
+ wait_for_ready=None,
342
+ timeout=None,
343
+ metadata=None,
344
+ ):
345
+ return grpc.experimental.unary_unary(
346
+ request,
347
+ target,
348
+ "/daemon_runtime_api_v1.Api/DownloadArtifact",
349
+ daemon__runtime__api__v1__pb2.DownloadArtifactRequest.SerializeToString,
350
+ daemon__runtime__api__v1__pb2.ArtifactPayload.FromString,
351
+ options,
352
+ channel_credentials,
353
+ insecure,
354
+ call_credentials,
355
+ compression,
356
+ wait_for_ready,
357
+ timeout,
358
+ metadata,
359
+ _registered_method=True,
360
+ )
361
+
362
+ @staticmethod
363
+ def ListArtifacts(
364
+ request,
365
+ target,
366
+ options=(),
367
+ channel_credentials=None,
368
+ call_credentials=None,
369
+ insecure=False,
370
+ compression=None,
371
+ wait_for_ready=None,
372
+ timeout=None,
373
+ metadata=None,
374
+ ):
375
+ return grpc.experimental.unary_unary(
376
+ request,
377
+ target,
378
+ "/daemon_runtime_api_v1.Api/ListArtifacts",
379
+ daemon__runtime__api__v1__pb2.ListArtifactsRequest.SerializeToString,
380
+ daemon__runtime__api__v1__pb2.ListArtifactsResponse.FromString,
381
+ options,
382
+ channel_credentials,
383
+ insecure,
384
+ call_credentials,
385
+ compression,
386
+ wait_for_ready,
387
+ timeout,
388
+ metadata,
389
+ _registered_method=True,
390
+ )
@@ -0,0 +1,18 @@
1
+ # Copyright 2026 Scaleway
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ from .artifact import Artifact
16
+ from .daemon import DaemonInfo
17
+ from .task_run import TaskRun, TaskRunStatus
18
+ from .worker_entry import WorkerEntry
@@ -0,0 +1,20 @@
1
+ # Copyright 2026 Scaleway
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ from dataclasses import dataclass
16
+
17
+
18
+ @dataclass(frozen=True)
19
+ class Artifact:
20
+ hash: str
@@ -0,0 +1,21 @@
1
+ # Copyright 2026 Scaleway
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ from dataclasses import dataclass
16
+
17
+
18
+ @dataclass(frozen=True)
19
+ class DaemonInfo:
20
+ name: str
21
+ version: str
@@ -0,0 +1,30 @@
1
+ # Copyright 2026 Scaleway
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ from enum import IntEnum
15
+
16
+ from dataclasses import dataclass
17
+
18
+
19
+ class TaskRunStatus(IntEnum):
20
+ UNKNOWN = 0
21
+ PENDING = 1
22
+ RUNNING = 2
23
+ DONE = 3
24
+ ERROR = 4
25
+
26
+
27
+ @dataclass(frozen=True)
28
+ class TaskRun:
29
+ id: str
30
+ status: TaskRunStatus
@@ -0,0 +1,21 @@
1
+ # Copyright 2026 Scaleway
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ from dataclasses import dataclass
15
+
16
+
17
+ @dataclass(frozen=True)
18
+ class WorkerEntry:
19
+ hash: str
20
+ provider: str
21
+ input_format: str
@@ -0,0 +1,28 @@
1
+ # Copyright 2026 Scaleway
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ import importlib.metadata
15
+ import platform
16
+
17
+ from typing import Final
18
+
19
+ QALL_DAEMON_CLIENT_VERSION: Final = importlib.metadata.version("qall-daemon-client")
20
+
21
+ __version__: Final = QALL_DAEMON_CLIENT_VERSION
22
+
23
+ USER_AGENT: Final = " ".join(
24
+ [
25
+ f"qall-daemon-client/{QALL_DAEMON_CLIENT_VERSION}",
26
+ f"({platform.system()}; {platform.python_implementation()}/{platform.python_version()})",
27
+ ]
28
+ )
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.4
2
+ Name: qall-daemon-client
3
+ Version: 0.1.1
4
+ Summary: Qall daemon client package
5
+ License: Apache-2.0
6
+ Project-URL: Repository, https://github.com/qall-project/qall-daemon
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Topic :: Scientific/Engineering
12
+ Requires-Python: >=3.10
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: dataclasses
16
+ Requires-Dist: googleapis-common-protos>=1.75.0
17
+ Requires-Dist: grpcio>=1.81.1
18
+ Requires-Dist: protobuf>=7.35.1
19
+ Dynamic: license-file
@@ -0,0 +1,19 @@
1
+ qall_daemon_client/__init__.py,sha256=rrYQU0_FeEWFXnVxjsgxihMbSBf5-QyYCVLTuKZ89XU,606
2
+ qall_daemon_client/versions.py,sha256=JG1li5JFPz1MELepO2ppWZWZvTejkupHsQPIf3fQuts,979
3
+ qall_daemon_client/v1/__init__.py,sha256=TGK3_PlkUQiB3_oPKEh6mg8zDLyBGQOXczOyMUPv3do,615
4
+ qall_daemon_client/v1/client/__init__.py,sha256=3iy3jYcSlUchAuoMsAo7pAjeZ8JXO2cCS79_46I0uJk,643
5
+ qall_daemon_client/v1/client/base.py,sha256=WVduhuBGrJNXkxgaj2oFM3djzbMO3VF2_4PFZe1CEVc,1935
6
+ qall_daemon_client/v1/client/grpc_client.py,sha256=wJymEtWIQqPiG1uKBQNDupAMmrm9dRcFA8c1YnSme9w,5187
7
+ qall_daemon_client/v1/client/protobuf/daemon_runtime_api_v1/daemon_runtime_api_v1_pb2.py,sha256=tqJE-LtbrSt8JL1Rxhesv5EeicqRMYtj7VES-AO5N48,7312
8
+ qall_daemon_client/v1/client/protobuf/daemon_runtime_api_v1/daemon_runtime_api_v1_pb2.pyi,sha256=jg7NQllPg6HmxYbJ2Fz6CJV-IaHIeYpvooresTWt4ZE,4682
9
+ qall_daemon_client/v1/client/protobuf/daemon_runtime_api_v1/daemon_runtime_api_v1_pb2_grpc.py,sha256=U5UYuTYZXff94HayL9LLX6-ansypFeE0d0qEVJ0uRo8,14299
10
+ qall_daemon_client/v1/objects/__init__.py,sha256=iOOo1s3zz3QdffHjfOYQR7MhcC2no7POjF2MSYejnBg,716
11
+ qall_daemon_client/v1/objects/artifact.py,sha256=Td--XkzLykHw9xvVlQ1BgwcuGryiU8yag-MkEHyRwO8,661
12
+ qall_daemon_client/v1/objects/daemon.py,sha256=naFowWKdMEUgyVxxQn5ii_d1fgnx2-l1iJQ5Jgqu0yo,680
13
+ qall_daemon_client/v1/objects/task_run.py,sha256=CWjsBflsY5KGfJDCb6J1jkHstDRbH54wDOV8_VucTfk,816
14
+ qall_daemon_client/v1/objects/worker_entry.py,sha256=9Nu9fzLnqrh7LmjeHQa1to2OLPcMkVjJpC9xnv6cC0M,703
15
+ qall_daemon_client-0.1.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
16
+ qall_daemon_client-0.1.1.dist-info/METADATA,sha256=a2hWqKzpmQrzqO6GgzI3-hG9bk3FP7qVmjTcSZZtfOs,665
17
+ qall_daemon_client-0.1.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
18
+ qall_daemon_client-0.1.1.dist-info/top_level.txt,sha256=FzqE8Y6ke78HD2hot77UHZkFys4J9pGqGsrvjOGJmEY,19
19
+ qall_daemon_client-0.1.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1 @@
1
+ qall_daemon_client