@planqk/planqk-api-sdk 1.6.0 → 1.9.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.
package/.env.template CHANGED
@@ -1,3 +1,3 @@
1
- PLANQK_API_BASE_URL=https://platform.planqk.de/qc-catalog
2
- PLANQK_PERSONAL_ACCESS_TOKEN=
3
- PLANQK_ORGANIZATION_ID=
1
+ KQH_BASE_URL=https://api.hub.kipu-quantum.com/qc-catalog
2
+ KQH_PERSONAL_ACCESS_TOKEN=
3
+ KQH_ORGANIZATION_ID=
package/.gitlab-ci.yml CHANGED
@@ -26,10 +26,6 @@ compile-node-sdk:
26
26
  - npm ci
27
27
  script:
28
28
  - npm run build
29
- artifacts:
30
- expire_in: 1 hour
31
- paths:
32
- - dist
33
29
  cache:
34
30
  key: node_modules
35
31
  paths:
@@ -77,6 +73,8 @@ publish-python-sdk:
77
73
  - if: '$CI_COMMIT_TAG'
78
74
  image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
79
75
  before_script:
76
+ - uv venv
77
+ - uv sync --frozen
80
78
  - source .venv/bin/activate
81
79
  - uv pip install twine
82
80
  script:
@@ -94,6 +92,11 @@ publish-node-sdk:
94
92
  rules:
95
93
  - if: '$CI_COMMIT_TAG'
96
94
  image: node:lts
95
+ id_tokens:
96
+ NPM_ID_TOKEN:
97
+ aud: "npm:registry.npmjs.org"
98
+ SIGSTORE_ID_TOKEN:
99
+ aud: sigstore
97
100
  before_script:
98
101
  - npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
99
102
  script:
@@ -101,10 +104,6 @@ publish-node-sdk:
101
104
  - cp README-node.md README.md
102
105
  - npm run build
103
106
  - npm publish
104
- artifacts:
105
- expire_in: 1 hour
106
- paths:
107
- - dist
108
107
  cache:
109
108
  key: node_modules
110
109
  paths:
package/README-node.md CHANGED
@@ -10,4 +10,4 @@ npm install @planqk/planqk-api-sdk
10
10
 
11
11
  ## Usage
12
12
 
13
- The usage docs are available at <https://docs.planqk.de/sdk-api-reference.html>.
13
+ The usage docs are available at <https://docs.hub.kipu-quantum.com/sdk-api-reference.html>.
package/README-python.md CHANGED
@@ -10,4 +10,4 @@ pip install --upgrade planqk-api-sdk
10
10
 
11
11
  ## Usage
12
12
 
13
- The usage docs are available at <https://docs.planqk.de/sdk-api-reference.html>.
13
+ The usage docs are available at <https://docs.hub.kipu-quantum.com/sdk-api-reference.html>.
package/README.md CHANGED
@@ -10,4 +10,4 @@ npm install @planqk/planqk-api-sdk
10
10
 
11
11
  ## Usage
12
12
 
13
- The usage docs are available at <https://docs.planqk.de/sdk-api-reference.html>.
13
+ The usage docs are available at <https://docs.hub.kipu-quantum.com/sdk-api-reference.html>.
@@ -2,6 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export declare const PlanqkApiEnvironment: {
5
- readonly Default: "https://platform.planqk.de/qc-catalog";
5
+ readonly Default: "https://api.hub.kipu-quantum.com/qc-catalog";
6
6
  };
7
7
  export type PlanqkApiEnvironment = typeof PlanqkApiEnvironment.Default;
@@ -5,5 +5,5 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PlanqkApiEnvironment = void 0;
7
7
  exports.PlanqkApiEnvironment = {
8
- Default: "https://platform.planqk.de/qc-catalog",
8
+ Default: "https://api.hub.kipu-quantum.com/qc-catalog",
9
9
  };
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "servers": [
14
14
  {
15
- "url": "https://platform.planqk.de/qc-catalog",
15
+ "url": "https://api.hub.kipu-quantum.com/qc-catalog",
16
16
  "description": "Platform API URL"
17
17
  }
18
18
  ],
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@planqk/planqk-api-sdk",
3
- "version": "1.6.0",
3
+ "version": "1.9.0",
4
4
  "description": "SDK to interact with the official PLANQK API.",
5
5
  "author": "Kipu Quantum GmbH",
6
6
  "contributors": [
7
+ "Harzenetter, Lukas <lukas.harzenetter@kipu-quantum.com>",
7
8
  "Wurster, Michael <michael.wurster@kipu-quantum.com>"
8
9
  ],
9
10
  "license": "Apache-2.0",
@@ -1 +1 @@
1
- __version__ = "1.6.0"
1
+ __version__ = "1.9.0"
@@ -7,12 +7,12 @@ from planqk.api.credentials import DefaultCredentialsProvider
7
7
  from planqk.api.sdk import PlanqkApi
8
8
  from planqk.api.sdk.data_pools.client import DataPoolsClient
9
9
 
10
- _PLANQK_API_BASE_URL_NAME = "PLANQK_API_BASE_URL"
10
+ _BASE_URL = "KQH_BASE_URL"
11
11
 
12
12
 
13
13
  class PlanqkApiClient:
14
14
  def __init__(self, access_token: Optional[str] = None, organization_id: Optional[str] = None):
15
- base_url = os.environ.get(_PLANQK_API_BASE_URL_NAME, "https://platform.planqk.de/qc-catalog")
15
+ base_url = os.environ.get(_BASE_URL, "https://api.hub.kipu-quantum.com/qc-catalog")
16
16
  credentials_provider = DefaultCredentialsProvider(access_token)
17
17
 
18
18
  self.api = PlanqkApi(base_url=base_url, api_key=credentials_provider.get_access_token(), organization_id=organization_id)
@@ -4,8 +4,8 @@ import platform
4
4
  from abc import ABC, abstractmethod
5
5
  from json import JSONDecodeError
6
6
 
7
- _PERSONAL_ACCESS_TOKEN_NAME = "PLANQK_PERSONAL_ACCESS_TOKEN"
8
- _CONFIG_FILE_PATH = "PLANQK_CONFIG_FILE_PATH"
7
+ _PERSONAL_ACCESS_TOKEN = "KQH_PERSONAL_ACCESS_TOKEN"
8
+ _CONFIG_FILE_PATH = "KQH_CONFIG_FILE_PATH"
9
9
 
10
10
 
11
11
  class CredentialUnavailableError(Exception):
@@ -15,7 +15,7 @@ class CredentialUnavailableError(Exception):
15
15
 
16
16
  def __init__(self, message=None):
17
17
  if message is None:
18
- message = f"Credentials not found. Please set your personal access token as parameter, in the environment, or use 'planqk login' to authenticate."
18
+ message = "Credentials not found. Please set your personal access token as parameter, in the environment, or use 'planqk login' to authenticate."
19
19
  super().__init__(message)
20
20
 
21
21
 
@@ -29,10 +29,10 @@ class CredentialProvider(ABC):
29
29
  class EnvironmentCredential(CredentialProvider):
30
30
 
31
31
  def get_access_token(self) -> str:
32
- access_token = os.environ.get(_PERSONAL_ACCESS_TOKEN_NAME)
32
+ access_token = os.environ.get(_PERSONAL_ACCESS_TOKEN)
33
33
 
34
34
  if not access_token:
35
- raise CredentialUnavailableError(f"Environment variable {_PERSONAL_ACCESS_TOKEN_NAME} is not set")
35
+ raise CredentialUnavailableError(f"Environment variable {_PERSONAL_ACCESS_TOKEN} is not set")
36
36
 
37
37
  return access_token
38
38
 
@@ -80,7 +80,7 @@ class StaticCredential(CredentialProvider):
80
80
 
81
81
  def get_access_token(self) -> str:
82
82
  if not self.access_token:
83
- raise CredentialUnavailableError(f"Access token not set")
83
+ raise CredentialUnavailableError("Access token not set")
84
84
  return self.access_token
85
85
 
86
86
 
@@ -4,4 +4,4 @@ import enum
4
4
 
5
5
 
6
6
  class PlanqkApiEnvironment(enum.Enum):
7
- DEFAULT = "https://platform.planqk.de/qc-catalog"
7
+ DEFAULT = "https://api.hub.kipu-quantum.com/qc-catalog"
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "planqk-api-sdk"
3
- version = "1.6.0"
3
+ version = "1.9.0"
4
4
  description = "SDK to interact with the official PLANQK API."
5
5
  authors = [
6
6
  { name = "Kipu Quantum GmbH", email = "info@kipu-quantum.com" },
@@ -34,8 +34,8 @@ dev = [
34
34
  ]
35
35
 
36
36
  [project.urls]
37
- Homepage = "https://kipu-quantum.com/platform"
38
- Documentation = "https://docs.planqk.de"
37
+ Homepage = "https://hub.kipu-quantum.com"
38
+ Documentation = "https://docs.hub.kipu-quantum.com"
39
39
  Repository = "https://gitlab.com/planqk-foss/planqk-api-sdk"
40
40
  Issues = "https://gitlab.com/planqk-foss/planqk-api-sdk/-/issues"
41
41
  Changelog = "https://gitlab.com/planqk-foss/planqk-api-sdk/-/releases"
package/src/index.test.ts CHANGED
@@ -3,11 +3,11 @@ import {test} from 'vitest'
3
3
  import 'dotenv/config'
4
4
  import {PlanqkApiClient} from "./sdk";
5
5
 
6
- test.skip('integration test: data pools', {timeout: 5 * 60 * 1000}, async () => {
7
- const baseUrl = process.env.PLANQK_API_BASE_URL!
8
- const apiKey = process.env.PLANQK_PERSONAL_ACCESS_TOKEN!
9
- const organizationId = process.env.PLANQK_ORGANIZATION_ID
6
+ const baseUrl = process.env.KQH_BASE_URL!
7
+ const apiKey = process.env.KQH_PERSONAL_ACCESS_TOKEN!
8
+ const organizationId = process.env.KQH_ORGANIZATION_ID
10
9
 
10
+ test.skip('integration test: data pools', {timeout: 5 * 60 * 1000}, async () => {
11
11
  const client = new PlanqkApiClient({baseUrl, apiKey, organizationId})
12
12
 
13
13
  const dataPools = await client.dataPools.getDataPools()
@@ -18,10 +18,6 @@ test.skip('integration test: data pools', {timeout: 5 * 60 * 1000}, async () =>
18
18
  })
19
19
 
20
20
  test.skip('integration test: service jobs', {timeout: 5 * 60 * 1000}, async () => {
21
- const baseUrl = process.env.PLANQK_API_BASE_URL!
22
- const apiKey = process.env.PLANQK_PERSONAL_ACCESS_TOKEN!
23
- const organizationId = process.env.PLANQK_ORGANIZATION_ID
24
-
25
21
  const client = new PlanqkApiClient({baseUrl, apiKey, organizationId})
26
22
 
27
23
  const serviceJobs = await client.serviceJobs.getServiceJobs()
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  export const PlanqkApiEnvironment = {
6
- Default: "https://platform.planqk.de/qc-catalog",
6
+ Default: "https://api.hub.kipu-quantum.com/qc-catalog",
7
7
  } as const;
8
8
 
9
9
  export type PlanqkApiEnvironment = typeof PlanqkApiEnvironment.Default;