@planqk/planqk-api-sdk 1.0.2 → 1.2.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.
Files changed (80) hide show
  1. package/dist/Client.d.ts +9 -2
  2. package/dist/Client.js +7 -1
  3. package/dist/api/index.d.ts +1 -1
  4. package/dist/api/index.js +1 -1
  5. package/dist/api/resources/authentication/client/Client.d.ts +55 -0
  6. package/dist/api/resources/authentication/client/Client.js +126 -0
  7. package/dist/api/resources/authentication/client/index.d.ts +1 -0
  8. package/dist/api/resources/authentication/client/index.js +2 -0
  9. package/dist/api/resources/authentication/index.d.ts +2 -0
  10. package/dist/api/resources/authentication/index.js +18 -0
  11. package/dist/api/resources/authentication/types/AuthorizeResponse.d.ts +5 -0
  12. package/dist/api/resources/authentication/types/AuthorizeResponse.js +5 -0
  13. package/dist/api/resources/authentication/types/index.d.ts +1 -0
  14. package/dist/api/resources/authentication/types/index.js +17 -0
  15. package/dist/api/resources/dataPools/client/Client.d.ts +10 -3
  16. package/dist/api/resources/dataPools/client/Client.js +37 -9
  17. package/dist/api/resources/index.d.ts +2 -0
  18. package/dist/api/resources/index.js +3 -1
  19. package/dist/api/types/AccessToken.d.ts +10 -0
  20. package/dist/api/types/AccessToken.js +5 -0
  21. package/dist/api/types/OrganizationMembership.d.ts +22 -0
  22. package/dist/api/types/OrganizationMembership.js +19 -0
  23. package/dist/api/types/PersonalAccessTokenPrincipal.d.ts +18 -0
  24. package/dist/api/types/PersonalAccessTokenPrincipal.js +14 -0
  25. package/dist/api/types/ServiceExecution.d.ts +20 -0
  26. package/dist/api/types/ServiceExecution.js +16 -0
  27. package/dist/api/types/ServiceExecutionTokenPrincipal.d.ts +8 -0
  28. package/dist/api/types/ServiceExecutionTokenPrincipal.js +5 -0
  29. package/dist/api/types/UserContext.d.ts +24 -0
  30. package/dist/api/types/UserContext.js +19 -0
  31. package/dist/api/types/index.d.ts +6 -0
  32. package/dist/api/types/index.js +6 -0
  33. package/fern/fern.config.json +1 -1
  34. package/fern/openapi/openapi.json +321 -15
  35. package/package.json +1 -1
  36. package/planqk/api/_version.py +1 -1
  37. package/planqk/api/client.py +3 -2
  38. package/planqk/api/sdk/__init__.py +34 -2
  39. package/planqk/api/sdk/authentication/__init__.py +7 -0
  40. package/planqk/api/sdk/authentication/client.py +102 -0
  41. package/planqk/api/sdk/authentication/raw_client.py +183 -0
  42. package/planqk/api/sdk/authentication/types/__init__.py +7 -0
  43. package/planqk/api/sdk/authentication/types/authorize_response.py +8 -0
  44. package/planqk/api/sdk/client.py +11 -0
  45. package/planqk/api/sdk/core/client_wrapper.py +12 -2
  46. package/planqk/api/sdk/data_pools/client.py +16 -0
  47. package/planqk/api/sdk/environment.py +1 -1
  48. package/planqk/api/sdk/types/__init__.py +30 -1
  49. package/planqk/api/sdk/types/access_token.py +26 -0
  50. package/planqk/api/sdk/types/organization_membership.py +27 -0
  51. package/planqk/api/sdk/types/organization_membership_account_type.py +5 -0
  52. package/planqk/api/sdk/types/organization_membership_role.py +5 -0
  53. package/planqk/api/sdk/types/personal_access_token_principal.py +31 -0
  54. package/planqk/api/sdk/types/personal_access_token_principal_account_type.py +5 -0
  55. package/planqk/api/sdk/types/service_execution.py +27 -0
  56. package/planqk/api/sdk/types/service_execution_status.py +7 -0
  57. package/planqk/api/sdk/types/service_execution_token_principal.py +34 -0
  58. package/planqk/api/sdk/types/user_context.py +35 -0
  59. package/planqk/api/sdk/types/user_context_account_type.py +5 -0
  60. package/planqk/api/sdk/types/user_context_context_type.py +5 -0
  61. package/pyproject.toml +6 -1
  62. package/src/Client.ts +13 -2
  63. package/src/api/index.ts +1 -1
  64. package/src/api/resources/authentication/client/Client.ts +134 -0
  65. package/src/api/resources/authentication/client/index.ts +1 -0
  66. package/src/api/resources/authentication/index.ts +2 -0
  67. package/src/api/resources/authentication/types/AuthorizeResponse.ts +7 -0
  68. package/src/api/resources/authentication/types/index.ts +1 -0
  69. package/src/api/resources/dataPools/client/Client.ts +42 -10
  70. package/src/api/resources/index.ts +2 -0
  71. package/src/api/types/AccessToken.ts +11 -0
  72. package/src/api/types/OrganizationMembership.ts +24 -0
  73. package/src/api/types/PersonalAccessTokenPrincipal.ts +21 -0
  74. package/src/api/types/ServiceExecution.ts +22 -0
  75. package/src/api/types/ServiceExecutionTokenPrincipal.ts +10 -0
  76. package/src/api/types/UserContext.ts +27 -0
  77. package/src/api/types/index.ts +6 -0
  78. package/uv.lock +27 -269
  79. package/README-node.md +0 -18
  80. package/README-python.md +0 -21
@@ -0,0 +1,102 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
+ from ..core.request_options import RequestOptions
7
+ from .raw_client import AsyncRawAuthenticationClient, RawAuthenticationClient
8
+ from .types.authorize_response import AuthorizeResponse
9
+
10
+
11
+ class AuthenticationClient:
12
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
13
+ self._raw_client = RawAuthenticationClient(client_wrapper=client_wrapper)
14
+
15
+ @property
16
+ def with_raw_response(self) -> RawAuthenticationClient:
17
+ """
18
+ Retrieves a raw implementation of this client that returns raw responses.
19
+
20
+ Returns
21
+ -------
22
+ RawAuthenticationClient
23
+ """
24
+ return self._raw_client
25
+
26
+ def authorize(self, *, request_options: typing.Optional[RequestOptions] = None) -> AuthorizeResponse:
27
+ """
28
+ Get the authenticated principal based on the provided token.
29
+
30
+ Parameters
31
+ ----------
32
+ request_options : typing.Optional[RequestOptions]
33
+ Request-specific configuration.
34
+
35
+ Returns
36
+ -------
37
+ AuthorizeResponse
38
+ The scopes of the provided token.
39
+
40
+ Examples
41
+ --------
42
+ from planqk import PlanqkApi
43
+
44
+ client = PlanqkApi(
45
+ organization_id="YOUR_ORGANIZATION_ID",
46
+ api_key="YOUR_API_KEY",
47
+ )
48
+ client.authentication.authorize()
49
+ """
50
+ _response = self._raw_client.authorize(request_options=request_options)
51
+ return _response.data
52
+
53
+
54
+ class AsyncAuthenticationClient:
55
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
56
+ self._raw_client = AsyncRawAuthenticationClient(client_wrapper=client_wrapper)
57
+
58
+ @property
59
+ def with_raw_response(self) -> AsyncRawAuthenticationClient:
60
+ """
61
+ Retrieves a raw implementation of this client that returns raw responses.
62
+
63
+ Returns
64
+ -------
65
+ AsyncRawAuthenticationClient
66
+ """
67
+ return self._raw_client
68
+
69
+ async def authorize(self, *, request_options: typing.Optional[RequestOptions] = None) -> AuthorizeResponse:
70
+ """
71
+ Get the authenticated principal based on the provided token.
72
+
73
+ Parameters
74
+ ----------
75
+ request_options : typing.Optional[RequestOptions]
76
+ Request-specific configuration.
77
+
78
+ Returns
79
+ -------
80
+ AuthorizeResponse
81
+ The scopes of the provided token.
82
+
83
+ Examples
84
+ --------
85
+ import asyncio
86
+
87
+ from planqk import AsyncPlanqkApi
88
+
89
+ client = AsyncPlanqkApi(
90
+ organization_id="YOUR_ORGANIZATION_ID",
91
+ api_key="YOUR_API_KEY",
92
+ )
93
+
94
+
95
+ async def main() -> None:
96
+ await client.authentication.authorize()
97
+
98
+
99
+ asyncio.run(main())
100
+ """
101
+ _response = await self._raw_client.authorize(request_options=request_options)
102
+ return _response.data
@@ -0,0 +1,183 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from json.decoder import JSONDecodeError
5
+
6
+ from ..core.api_error import ApiError
7
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
+ from ..core.http_response import AsyncHttpResponse, HttpResponse
9
+ from ..core.pydantic_utilities import parse_obj_as
10
+ from ..core.request_options import RequestOptions
11
+ from ..errors.forbidden_error import ForbiddenError
12
+ from ..errors.internal_server_error import InternalServerError
13
+ from ..errors.not_found_error import NotFoundError
14
+ from ..errors.unauthorized_error import UnauthorizedError
15
+ from .types.authorize_response import AuthorizeResponse
16
+
17
+
18
+ class RawAuthenticationClient:
19
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
20
+ self._client_wrapper = client_wrapper
21
+
22
+ def authorize(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[AuthorizeResponse]:
23
+ """
24
+ Get the authenticated principal based on the provided token.
25
+
26
+ Parameters
27
+ ----------
28
+ request_options : typing.Optional[RequestOptions]
29
+ Request-specific configuration.
30
+
31
+ Returns
32
+ -------
33
+ HttpResponse[AuthorizeResponse]
34
+ The scopes of the provided token.
35
+ """
36
+ _response = self._client_wrapper.httpx_client.request(
37
+ "authorize",
38
+ method="POST",
39
+ request_options=request_options,
40
+ )
41
+ try:
42
+ if 200 <= _response.status_code < 300:
43
+ _data = typing.cast(
44
+ AuthorizeResponse,
45
+ parse_obj_as(
46
+ type_=AuthorizeResponse, # type: ignore
47
+ object_=_response.json(),
48
+ ),
49
+ )
50
+ return HttpResponse(response=_response, data=_data)
51
+ if _response.status_code == 401:
52
+ raise UnauthorizedError(
53
+ headers=dict(_response.headers),
54
+ body=typing.cast(
55
+ typing.Optional[typing.Any],
56
+ parse_obj_as(
57
+ type_=typing.Optional[typing.Any], # type: ignore
58
+ object_=_response.json(),
59
+ ),
60
+ ),
61
+ )
62
+ if _response.status_code == 403:
63
+ raise ForbiddenError(
64
+ headers=dict(_response.headers),
65
+ body=typing.cast(
66
+ typing.Optional[typing.Any],
67
+ parse_obj_as(
68
+ type_=typing.Optional[typing.Any], # type: ignore
69
+ object_=_response.json(),
70
+ ),
71
+ ),
72
+ )
73
+ if _response.status_code == 404:
74
+ raise NotFoundError(
75
+ headers=dict(_response.headers),
76
+ body=typing.cast(
77
+ typing.Optional[typing.Any],
78
+ parse_obj_as(
79
+ type_=typing.Optional[typing.Any], # type: ignore
80
+ object_=_response.json(),
81
+ ),
82
+ ),
83
+ )
84
+ if _response.status_code == 500:
85
+ raise InternalServerError(
86
+ headers=dict(_response.headers),
87
+ body=typing.cast(
88
+ typing.Optional[typing.Any],
89
+ parse_obj_as(
90
+ type_=typing.Optional[typing.Any], # type: ignore
91
+ object_=_response.json(),
92
+ ),
93
+ ),
94
+ )
95
+ _response_json = _response.json()
96
+ except JSONDecodeError:
97
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
98
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
99
+
100
+
101
+ class AsyncRawAuthenticationClient:
102
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
103
+ self._client_wrapper = client_wrapper
104
+
105
+ async def authorize(
106
+ self, *, request_options: typing.Optional[RequestOptions] = None
107
+ ) -> AsyncHttpResponse[AuthorizeResponse]:
108
+ """
109
+ Get the authenticated principal based on the provided token.
110
+
111
+ Parameters
112
+ ----------
113
+ request_options : typing.Optional[RequestOptions]
114
+ Request-specific configuration.
115
+
116
+ Returns
117
+ -------
118
+ AsyncHttpResponse[AuthorizeResponse]
119
+ The scopes of the provided token.
120
+ """
121
+ _response = await self._client_wrapper.httpx_client.request(
122
+ "authorize",
123
+ method="POST",
124
+ request_options=request_options,
125
+ )
126
+ try:
127
+ if 200 <= _response.status_code < 300:
128
+ _data = typing.cast(
129
+ AuthorizeResponse,
130
+ parse_obj_as(
131
+ type_=AuthorizeResponse, # type: ignore
132
+ object_=_response.json(),
133
+ ),
134
+ )
135
+ return AsyncHttpResponse(response=_response, data=_data)
136
+ if _response.status_code == 401:
137
+ raise UnauthorizedError(
138
+ headers=dict(_response.headers),
139
+ body=typing.cast(
140
+ typing.Optional[typing.Any],
141
+ parse_obj_as(
142
+ type_=typing.Optional[typing.Any], # type: ignore
143
+ object_=_response.json(),
144
+ ),
145
+ ),
146
+ )
147
+ if _response.status_code == 403:
148
+ raise ForbiddenError(
149
+ headers=dict(_response.headers),
150
+ body=typing.cast(
151
+ typing.Optional[typing.Any],
152
+ parse_obj_as(
153
+ type_=typing.Optional[typing.Any], # type: ignore
154
+ object_=_response.json(),
155
+ ),
156
+ ),
157
+ )
158
+ if _response.status_code == 404:
159
+ raise NotFoundError(
160
+ headers=dict(_response.headers),
161
+ body=typing.cast(
162
+ typing.Optional[typing.Any],
163
+ parse_obj_as(
164
+ type_=typing.Optional[typing.Any], # type: ignore
165
+ object_=_response.json(),
166
+ ),
167
+ ),
168
+ )
169
+ if _response.status_code == 500:
170
+ raise InternalServerError(
171
+ headers=dict(_response.headers),
172
+ body=typing.cast(
173
+ typing.Optional[typing.Any],
174
+ parse_obj_as(
175
+ type_=typing.Optional[typing.Any], # type: ignore
176
+ object_=_response.json(),
177
+ ),
178
+ ),
179
+ )
180
+ _response_json = _response.json()
181
+ except JSONDecodeError:
182
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
183
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ from .authorize_response import AuthorizeResponse
6
+
7
+ __all__ = ["AuthorizeResponse"]
@@ -0,0 +1,8 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from ...types.personal_access_token_principal import PersonalAccessTokenPrincipal
6
+ from ...types.service_execution_token_principal import ServiceExecutionTokenPrincipal
7
+
8
+ AuthorizeResponse = typing.Union[PersonalAccessTokenPrincipal, ServiceExecutionTokenPrincipal]
@@ -3,6 +3,7 @@
3
3
  import typing
4
4
 
5
5
  import httpx
6
+ from .authentication.client import AsyncAuthenticationClient, AuthenticationClient
6
7
  from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
7
8
  from .data_pools.client import AsyncDataPoolsClient, DataPoolsClient
8
9
  from .environment import PlanqkApiEnvironment
@@ -26,6 +27,7 @@ class PlanqkApi:
26
27
 
27
28
 
28
29
 
30
+ organization_id : typing.Optional[str]
29
31
  api_key : str
30
32
  headers : typing.Optional[typing.Dict[str, str]]
31
33
  Additional headers to send with every request.
@@ -44,6 +46,7 @@ class PlanqkApi:
44
46
  from planqk import PlanqkApi
45
47
 
46
48
  client = PlanqkApi(
49
+ organization_id="YOUR_ORGANIZATION_ID",
47
50
  api_key="YOUR_API_KEY",
48
51
  )
49
52
  """
@@ -53,6 +56,7 @@ class PlanqkApi:
53
56
  *,
54
57
  base_url: typing.Optional[str] = None,
55
58
  environment: PlanqkApiEnvironment = PlanqkApiEnvironment.DEFAULT,
59
+ organization_id: typing.Optional[str] = None,
56
60
  api_key: str,
57
61
  headers: typing.Optional[typing.Dict[str, str]] = None,
58
62
  timeout: typing.Optional[float] = None,
@@ -64,6 +68,7 @@ class PlanqkApi:
64
68
  )
65
69
  self._client_wrapper = SyncClientWrapper(
66
70
  base_url=_get_base_url(base_url=base_url, environment=environment),
71
+ organization_id=organization_id,
67
72
  api_key=api_key,
68
73
  headers=headers,
69
74
  httpx_client=httpx_client
@@ -74,6 +79,7 @@ class PlanqkApi:
74
79
  timeout=_defaulted_timeout,
75
80
  )
76
81
  self.data_pools = DataPoolsClient(client_wrapper=self._client_wrapper)
82
+ self.authentication = AuthenticationClient(client_wrapper=self._client_wrapper)
77
83
 
78
84
 
79
85
  class AsyncPlanqkApi:
@@ -94,6 +100,7 @@ class AsyncPlanqkApi:
94
100
 
95
101
 
96
102
 
103
+ organization_id : typing.Optional[str]
97
104
  api_key : str
98
105
  headers : typing.Optional[typing.Dict[str, str]]
99
106
  Additional headers to send with every request.
@@ -112,6 +119,7 @@ class AsyncPlanqkApi:
112
119
  from planqk import AsyncPlanqkApi
113
120
 
114
121
  client = AsyncPlanqkApi(
122
+ organization_id="YOUR_ORGANIZATION_ID",
115
123
  api_key="YOUR_API_KEY",
116
124
  )
117
125
  """
@@ -121,6 +129,7 @@ class AsyncPlanqkApi:
121
129
  *,
122
130
  base_url: typing.Optional[str] = None,
123
131
  environment: PlanqkApiEnvironment = PlanqkApiEnvironment.DEFAULT,
132
+ organization_id: typing.Optional[str] = None,
124
133
  api_key: str,
125
134
  headers: typing.Optional[typing.Dict[str, str]] = None,
126
135
  timeout: typing.Optional[float] = None,
@@ -132,6 +141,7 @@ class AsyncPlanqkApi:
132
141
  )
133
142
  self._client_wrapper = AsyncClientWrapper(
134
143
  base_url=_get_base_url(base_url=base_url, environment=environment),
144
+ organization_id=organization_id,
135
145
  api_key=api_key,
136
146
  headers=headers,
137
147
  httpx_client=httpx_client
@@ -142,6 +152,7 @@ class AsyncPlanqkApi:
142
152
  timeout=_defaulted_timeout,
143
153
  )
144
154
  self.data_pools = AsyncDataPoolsClient(client_wrapper=self._client_wrapper)
155
+ self.authentication = AsyncAuthenticationClient(client_wrapper=self._client_wrapper)
145
156
 
146
157
 
147
158
  def _get_base_url(*, base_url: typing.Optional[str] = None, environment: PlanqkApiEnvironment) -> str:
@@ -10,11 +10,13 @@ class BaseClientWrapper:
10
10
  def __init__(
11
11
  self,
12
12
  *,
13
+ organization_id: typing.Optional[str] = None,
13
14
  api_key: str,
14
15
  headers: typing.Optional[typing.Dict[str, str]] = None,
15
16
  base_url: str,
16
17
  timeout: typing.Optional[float] = None,
17
18
  ):
19
+ self._organization_id = organization_id
18
20
  self.api_key = api_key
19
21
  self._headers = headers
20
22
  self._base_url = base_url
@@ -25,6 +27,8 @@ class BaseClientWrapper:
25
27
  "X-Fern-Language": "Python",
26
28
  **(self.get_custom_headers() or {}),
27
29
  }
30
+ if self._organization_id is not None:
31
+ headers["X-OrganizationId"] = self._organization_id
28
32
  headers["X-Auth-Token"] = self.api_key
29
33
  return headers
30
34
 
@@ -42,13 +46,16 @@ class SyncClientWrapper(BaseClientWrapper):
42
46
  def __init__(
43
47
  self,
44
48
  *,
49
+ organization_id: typing.Optional[str] = None,
45
50
  api_key: str,
46
51
  headers: typing.Optional[typing.Dict[str, str]] = None,
47
52
  base_url: str,
48
53
  timeout: typing.Optional[float] = None,
49
54
  httpx_client: httpx.Client,
50
55
  ):
51
- super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout)
56
+ super().__init__(
57
+ organization_id=organization_id, api_key=api_key, headers=headers, base_url=base_url, timeout=timeout
58
+ )
52
59
  self.httpx_client = HttpClient(
53
60
  httpx_client=httpx_client,
54
61
  base_headers=self.get_headers,
@@ -61,13 +68,16 @@ class AsyncClientWrapper(BaseClientWrapper):
61
68
  def __init__(
62
69
  self,
63
70
  *,
71
+ organization_id: typing.Optional[str] = None,
64
72
  api_key: str,
65
73
  headers: typing.Optional[typing.Dict[str, str]] = None,
66
74
  base_url: str,
67
75
  timeout: typing.Optional[float] = None,
68
76
  httpx_client: httpx.AsyncClient,
69
77
  ):
70
- super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout)
78
+ super().__init__(
79
+ organization_id=organization_id, api_key=api_key, headers=headers, base_url=base_url, timeout=timeout
80
+ )
71
81
  self.httpx_client = AsyncHttpClient(
72
82
  httpx_client=httpx_client,
73
83
  base_headers=self.get_headers,
@@ -49,6 +49,7 @@ class DataPoolsClient:
49
49
  from planqk import PlanqkApi
50
50
 
51
51
  client = PlanqkApi(
52
+ organization_id="YOUR_ORGANIZATION_ID",
52
53
  api_key="YOUR_API_KEY",
53
54
  )
54
55
  client.data_pools.get_data_pool(
@@ -93,6 +94,7 @@ class DataPoolsClient:
93
94
  from planqk import PlanqkApi
94
95
 
95
96
  client = PlanqkApi(
97
+ organization_id="YOUR_ORGANIZATION_ID",
96
98
  api_key="YOUR_API_KEY",
97
99
  )
98
100
  client.data_pools.update_data_pool(
@@ -124,6 +126,7 @@ class DataPoolsClient:
124
126
  from planqk import PlanqkApi
125
127
 
126
128
  client = PlanqkApi(
129
+ organization_id="YOUR_ORGANIZATION_ID",
127
130
  api_key="YOUR_API_KEY",
128
131
  )
129
132
  client.data_pools.delete_data_pool(
@@ -152,6 +155,7 @@ class DataPoolsClient:
152
155
  from planqk import PlanqkApi
153
156
 
154
157
  client = PlanqkApi(
158
+ organization_id="YOUR_ORGANIZATION_ID",
155
159
  api_key="YOUR_API_KEY",
156
160
  )
157
161
  client.data_pools.get_data_pools()
@@ -182,6 +186,7 @@ class DataPoolsClient:
182
186
  from planqk import PlanqkApi
183
187
 
184
188
  client = PlanqkApi(
189
+ organization_id="YOUR_ORGANIZATION_ID",
185
190
  api_key="YOUR_API_KEY",
186
191
  )
187
192
  client.data_pools.create_data_pool()
@@ -212,6 +217,7 @@ class DataPoolsClient:
212
217
  from planqk import PlanqkApi
213
218
 
214
219
  client = PlanqkApi(
220
+ organization_id="YOUR_ORGANIZATION_ID",
215
221
  api_key="YOUR_API_KEY",
216
222
  )
217
223
  client.data_pools.get_data_pool_files(
@@ -254,6 +260,7 @@ class DataPoolsClient:
254
260
  from planqk import PlanqkApi
255
261
 
256
262
  client = PlanqkApi(
263
+ organization_id="YOUR_ORGANIZATION_ID",
257
264
  api_key="YOUR_API_KEY",
258
265
  )
259
266
  client.data_pools.add_data_pool_file(
@@ -312,6 +319,7 @@ class DataPoolsClient:
312
319
  from planqk import PlanqkApi
313
320
 
314
321
  client = PlanqkApi(
322
+ organization_id="YOUR_ORGANIZATION_ID",
315
323
  api_key="YOUR_API_KEY",
316
324
  )
317
325
  client.data_pools.delete_data_pool_file(
@@ -361,6 +369,7 @@ class AsyncDataPoolsClient:
361
369
  from planqk import AsyncPlanqkApi
362
370
 
363
371
  client = AsyncPlanqkApi(
372
+ organization_id="YOUR_ORGANIZATION_ID",
364
373
  api_key="YOUR_API_KEY",
365
374
  )
366
375
 
@@ -413,6 +422,7 @@ class AsyncDataPoolsClient:
413
422
  from planqk import AsyncPlanqkApi
414
423
 
415
424
  client = AsyncPlanqkApi(
425
+ organization_id="YOUR_ORGANIZATION_ID",
416
426
  api_key="YOUR_API_KEY",
417
427
  )
418
428
 
@@ -452,6 +462,7 @@ class AsyncDataPoolsClient:
452
462
  from planqk import AsyncPlanqkApi
453
463
 
454
464
  client = AsyncPlanqkApi(
465
+ organization_id="YOUR_ORGANIZATION_ID",
455
466
  api_key="YOUR_API_KEY",
456
467
  )
457
468
 
@@ -490,6 +501,7 @@ class AsyncDataPoolsClient:
490
501
  from planqk import AsyncPlanqkApi
491
502
 
492
503
  client = AsyncPlanqkApi(
504
+ organization_id="YOUR_ORGANIZATION_ID",
493
505
  api_key="YOUR_API_KEY",
494
506
  )
495
507
 
@@ -528,6 +540,7 @@ class AsyncDataPoolsClient:
528
540
  from planqk import AsyncPlanqkApi
529
541
 
530
542
  client = AsyncPlanqkApi(
543
+ organization_id="YOUR_ORGANIZATION_ID",
531
544
  api_key="YOUR_API_KEY",
532
545
  )
533
546
 
@@ -566,6 +579,7 @@ class AsyncDataPoolsClient:
566
579
  from planqk import AsyncPlanqkApi
567
580
 
568
581
  client = AsyncPlanqkApi(
582
+ organization_id="YOUR_ORGANIZATION_ID",
569
583
  api_key="YOUR_API_KEY",
570
584
  )
571
585
 
@@ -616,6 +630,7 @@ class AsyncDataPoolsClient:
616
630
  from planqk import AsyncPlanqkApi
617
631
 
618
632
  client = AsyncPlanqkApi(
633
+ organization_id="YOUR_ORGANIZATION_ID",
619
634
  api_key="YOUR_API_KEY",
620
635
  )
621
636
 
@@ -683,6 +698,7 @@ class AsyncDataPoolsClient:
683
698
  from planqk import AsyncPlanqkApi
684
699
 
685
700
  client = AsyncPlanqkApi(
701
+ organization_id="YOUR_ORGANIZATION_ID",
686
702
  api_key="YOUR_API_KEY",
687
703
  )
688
704
 
@@ -4,4 +4,4 @@ import enum
4
4
 
5
5
 
6
6
  class PlanqkApiEnvironment(enum.Enum):
7
- DEFAULT = "https://34.90.225.20.nip.io/qc-catalog"
7
+ DEFAULT = "https://platform.planqk.de/qc-catalog"
@@ -2,9 +2,38 @@
2
2
 
3
3
  # isort: skip_file
4
4
 
5
+ from .access_token import AccessToken
5
6
  from .data_pool_dto import DataPoolDto
6
7
  from .data_pool_dto_current_user_permission import DataPoolDtoCurrentUserPermission
7
8
  from .data_pool_file_dto import DataPoolFileDto
8
9
  from .oauth_scope import OauthScope
10
+ from .organization_membership import OrganizationMembership
11
+ from .organization_membership_account_type import OrganizationMembershipAccountType
12
+ from .organization_membership_role import OrganizationMembershipRole
13
+ from .personal_access_token_principal import PersonalAccessTokenPrincipal
14
+ from .personal_access_token_principal_account_type import PersonalAccessTokenPrincipalAccountType
15
+ from .service_execution import ServiceExecution
16
+ from .service_execution_status import ServiceExecutionStatus
17
+ from .service_execution_token_principal import ServiceExecutionTokenPrincipal
18
+ from .user_context import UserContext
19
+ from .user_context_account_type import UserContextAccountType
20
+ from .user_context_context_type import UserContextContextType
9
21
 
10
- __all__ = ["DataPoolDto", "DataPoolDtoCurrentUserPermission", "DataPoolFileDto", "OauthScope"]
22
+ __all__ = [
23
+ "AccessToken",
24
+ "DataPoolDto",
25
+ "DataPoolDtoCurrentUserPermission",
26
+ "DataPoolFileDto",
27
+ "OauthScope",
28
+ "OrganizationMembership",
29
+ "OrganizationMembershipAccountType",
30
+ "OrganizationMembershipRole",
31
+ "PersonalAccessTokenPrincipal",
32
+ "PersonalAccessTokenPrincipalAccountType",
33
+ "ServiceExecution",
34
+ "ServiceExecutionStatus",
35
+ "ServiceExecutionTokenPrincipal",
36
+ "UserContext",
37
+ "UserContextAccountType",
38
+ "UserContextContextType",
39
+ ]
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ import pydantic
7
+ import typing_extensions
8
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
9
+ from ..core.serialization import FieldMetadata
10
+
11
+
12
+ class AccessToken(UniversalBaseModel):
13
+ id: typing.Optional[str] = None
14
+ name: typing.Optional[str] = None
15
+ created_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="createdAt")] = None
16
+ used_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="usedAt")] = None
17
+ expires_at: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="expiresAt")] = None
18
+
19
+ if IS_PYDANTIC_V2:
20
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
+ else:
22
+
23
+ class Config:
24
+ frozen = True
25
+ smart_union = True
26
+ extra = pydantic.Extra.allow
@@ -0,0 +1,27 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+ from .organization_membership_account_type import OrganizationMembershipAccountType
10
+ from .organization_membership_role import OrganizationMembershipRole
11
+
12
+
13
+ class OrganizationMembership(UniversalBaseModel):
14
+ id: typing.Optional[str] = None
15
+ account_type: typing_extensions.Annotated[
16
+ typing.Optional[OrganizationMembershipAccountType], FieldMetadata(alias="accountType")
17
+ ] = None
18
+ role: typing.Optional[OrganizationMembershipRole] = None
19
+
20
+ if IS_PYDANTIC_V2:
21
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
22
+ else:
23
+
24
+ class Config:
25
+ frozen = True
26
+ smart_union = True
27
+ extra = pydantic.Extra.allow
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ OrganizationMembershipAccountType = typing.Union[typing.Literal["BASIC", "PRO", "BUSINESS"], typing.Any]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ OrganizationMembershipRole = typing.Union[typing.Literal["VIEWER", "MAINTAINER", "OWNER"], typing.Any]