@planqk/planqk-service-sdk 2.3.0 → 2.4.0

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.
@@ -83,6 +83,28 @@
83
83
  "print(f\"Service execution finished at '{ended_at}' with status '{status}'\")"
84
84
  ]
85
85
  },
86
+ {
87
+ "cell_type": "code",
88
+ "execution_count": null,
89
+ "metadata": {},
90
+ "outputs": [],
91
+ "source": [
92
+ "from planqk.service.datapool import DataPoolReference\n",
93
+ "\n",
94
+ "# Prepare your input and specify which data pool to use at runtime\n",
95
+ "data = {\"file_to_read\": \"example.txt\"}\n",
96
+ "dataset = DataPoolReference(id=\"89ae42e1-9697-4742-adfb-95bf018104c3\")\n",
97
+ "\n",
98
+ "service_execution = client.run(request={\"data\": data, \"dataset\": dataset})\n",
99
+ "\n",
100
+ "# Wait for the service execution to finish (blocking)\n",
101
+ "service_execution.wait_for_final_state()\n",
102
+ "\n",
103
+ "status = service_execution.status\n",
104
+ "ended_at = service_execution.ended_at\n",
105
+ "print(f\"Service execution finished at '{ended_at}' with status '{status}'\")"
106
+ ]
107
+ },
86
108
  {
87
109
  "cell_type": "code",
88
110
  "execution_count": null,
@@ -192,7 +214,7 @@
192
214
  "name": "python",
193
215
  "nbconvert_exporter": "python",
194
216
  "pygments_lexer": "ipython3",
195
- "version": "3.11.11"
217
+ "version": "3.11.9"
196
218
  }
197
219
  },
198
220
  "nbformat": 4,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planqk/planqk-service-sdk",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "SDK to interact with PLANQK Managed Services.",
5
5
  "author": "Kipu Quantum GmbH",
6
6
  "contributors": [
@@ -1 +1 @@
1
- __version__ = "2.3.0"
1
+ __version__ = "2.4.0"
@@ -0,0 +1,24 @@
1
+ import typing
2
+ from enum import Enum
3
+
4
+ import pydantic
5
+
6
+ from .sdk.core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+
8
+
9
+ class ReferenceType(str, Enum):
10
+ DATAPOOL = "DATAPOOL"
11
+
12
+
13
+ class DataPoolReference(UniversalBaseModel):
14
+ id: str
15
+ ref: ReferenceType = ReferenceType.DATAPOOL
16
+
17
+ if IS_PYDANTIC_V2:
18
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow",
19
+ frozen=True) # type: ignore # Pydantic v2
20
+ else:
21
+ class Config:
22
+ frozen = True
23
+ smart_union = True
24
+ extra = pydantic.Extra.allow
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "planqk-service-sdk"
3
- version = "2.3.0"
3
+ version = "2.4.0"
4
4
  description = "SDK to interact with PLANQK Managed Services."
5
5
  authors = [
6
6
  { name = "Kipu Quantum GmbH", email = "info@kipu-quantum.com" },