@planqk/planqk-api-sdk 1.0.2 → 1.1.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/dist/Client.d.ts +1 -0
- package/dist/Client.js +1 -0
- package/package.json +1 -1
- package/planqk/api/_version.py +1 -1
- package/planqk/api/client.py +7 -2
- package/pyproject.toml +6 -1
- package/src/Client.ts +2 -0
- package/README-node.md +0 -18
- package/README-python.md +0 -21
package/dist/Client.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare namespace PlanqkApiClient {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey: core.Supplier<string>;
|
|
13
|
+
organizationId?: core.Supplier<string>;
|
|
13
14
|
/** Additional headers to include in requests. */
|
|
14
15
|
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
15
16
|
}
|
package/dist/Client.js
CHANGED
package/package.json
CHANGED
package/planqk/api/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.0
|
|
1
|
+
__version__ = "1.1.0"
|
package/planqk/api/client.py
CHANGED
|
@@ -9,10 +9,15 @@ _PLANQK_API_BASE_URL_NAME = "PLANQK_API_BASE_URL"
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class PlanqkApiClient:
|
|
12
|
-
def __init__(self, access_token: Optional[str] = None):
|
|
12
|
+
def __init__(self, access_token: Optional[str] = None, organization_id: Optional[str] = None):
|
|
13
13
|
base_url = os.environ.get(_PLANQK_API_BASE_URL_NAME, "https://platform.planqk.de/qc-catalog")
|
|
14
14
|
credentials_provider = DefaultCredentialsProvider(access_token)
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
headers = None
|
|
17
|
+
if organization_id:
|
|
18
|
+
headers = {"X-OrganizationId": organization_id}
|
|
19
|
+
|
|
20
|
+
self._api = PlanqkApi(base_url=base_url, api_key=credentials_provider.get_access_token(), headers=headers)
|
|
16
21
|
|
|
17
22
|
@property
|
|
18
23
|
def data_pools(self) -> DataPoolsClient:
|
package/pyproject.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "planqk-api-sdk"
|
|
3
|
-
version = "1.0
|
|
3
|
+
version = "1.1.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" },
|
|
@@ -49,3 +49,8 @@ include = ["planqk*"]
|
|
|
49
49
|
ignore-paths = '^planqk/api/sdk/.*$'
|
|
50
50
|
max-line-length = 120
|
|
51
51
|
disable = ['missing-module-docstring', 'missing-class-docstring', 'missing-function-docstring']
|
|
52
|
+
|
|
53
|
+
[tool.uv.workspace]
|
|
54
|
+
members = [
|
|
55
|
+
"python-test-app",
|
|
56
|
+
]
|
package/src/Client.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare namespace PlanqkApiClient {
|
|
|
13
13
|
/** Specify a custom URL to connect the client to. */
|
|
14
14
|
baseUrl?: core.Supplier<string>;
|
|
15
15
|
apiKey: core.Supplier<string>;
|
|
16
|
+
organizationId?: core.Supplier<string>;
|
|
16
17
|
/** Additional headers to include in requests. */
|
|
17
18
|
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
18
19
|
}
|
|
@@ -41,6 +42,7 @@ export class PlanqkApiClient {
|
|
|
41
42
|
"X-Fern-Language": "JavaScript",
|
|
42
43
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
43
44
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
45
|
+
"X-OrganizationId": _options.organizationId,
|
|
44
46
|
},
|
|
45
47
|
_options?.headers,
|
|
46
48
|
),
|
package/README-node.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# PLANQK API SDK
|
|
2
|
-
|
|
3
|
-
## Installation
|
|
4
|
-
|
|
5
|
-
The package can be installed using `npm`:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @planqk/planqk-api-sdk
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
const client = new PlanqkApiClient({baseUrl: baseUrl, apiKey: () => accessToken});
|
|
15
|
-
|
|
16
|
-
const dataPools = await client.dataPools.getDataPools();
|
|
17
|
-
console.log(dataPools)
|
|
18
|
-
```
|
package/README-python.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# PLANQK API SDK
|
|
2
|
-
|
|
3
|
-
## Installation
|
|
4
|
-
|
|
5
|
-
The package is published on PyPI and can be installed via `pip`:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pip install --upgrade planqk-api-sdk
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```python
|
|
14
|
-
from planqk.api.client import PlanqkApiClient
|
|
15
|
-
|
|
16
|
-
# Create a new client
|
|
17
|
-
client = PlanqkApiClient(access_token=YOUR_PERSONAL_ACCESS_TOKEN)
|
|
18
|
-
|
|
19
|
-
# Create a new data pool
|
|
20
|
-
data_pool = client.data_pools.create_data_pool(name="Example Data Pool")
|
|
21
|
-
```
|