@planqk/planqk-api-sdk 1.1.0 → 1.3.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 +2 -1
- package/.gitlab-ci.yml +1 -0
- package/README-node.md +13 -0
- package/README-python.md +13 -0
- package/README.md +6 -49
- package/apps/python-test-app/main.py +159 -0
- package/apps/python-test-app/my_file.txt +1 -0
- package/apps/ts-test-app/index.ts +140 -0
- package/apps/ts-test-app/package-lock.json +693 -0
- package/apps/ts-test-app/package.json +19 -0
- package/apps/ts-test-app/test-file.txt +1 -0
- package/apps/ts-test-app/tsconfig.json +11 -0
- package/dist/index.d.ts +1 -4
- package/dist/index.js +4 -31
- package/dist/{Client.d.ts → sdk/Client.d.ts} +4 -1
- package/dist/{Client.js → sdk/Client.js} +1 -1
- package/dist/{api → sdk/api}/resources/dataPools/client/Client.d.ts +7 -0
- package/dist/{api → sdk/api}/resources/dataPools/client/Client.js +36 -8
- package/dist/sdk/index.d.ts +4 -0
- package/dist/sdk/index.js +44 -0
- package/fern/fern.config.json +1 -1
- package/fern/openapi/openapi.json +121 -15
- package/package.json +3 -4
- package/planqk/api/_version.py +1 -1
- package/planqk/api/client.py +1 -5
- package/planqk/api/sdk/__init__.py +34 -2
- package/planqk/api/sdk/authentication/__init__.py +7 -0
- package/planqk/api/sdk/authentication/client.py +102 -0
- package/planqk/api/sdk/authentication/raw_client.py +183 -0
- package/planqk/api/sdk/authentication/types/__init__.py +7 -0
- package/planqk/api/sdk/authentication/types/authorize_response.py +8 -0
- package/planqk/api/sdk/client.py +11 -0
- package/planqk/api/sdk/core/client_wrapper.py +12 -2
- package/planqk/api/sdk/data_pools/client.py +16 -0
- package/planqk/api/sdk/environment.py +1 -1
- package/planqk/api/sdk/types/__init__.py +30 -1
- package/planqk/api/sdk/types/access_token.py +26 -0
- package/planqk/api/sdk/types/organization_membership.py +27 -0
- package/planqk/api/sdk/types/organization_membership_account_type.py +5 -0
- package/planqk/api/sdk/types/organization_membership_role.py +5 -0
- package/planqk/api/sdk/types/personal_access_token_principal.py +31 -0
- package/planqk/api/sdk/types/personal_access_token_principal_account_type.py +5 -0
- package/planqk/api/sdk/types/service_execution.py +27 -0
- package/planqk/api/sdk/types/service_execution_status.py +7 -0
- package/planqk/api/sdk/types/service_execution_token_principal.py +34 -0
- package/planqk/api/sdk/types/user_context.py +35 -0
- package/planqk/api/sdk/types/user_context_account_type.py +5 -0
- package/planqk/api/sdk/types/user_context_context_type.py +5 -0
- package/pyproject.toml +2 -6
- package/src/index.test.ts +6 -5
- package/src/index.ts +1 -4
- package/src/{Client.ts → sdk/Client.ts} +5 -2
- package/src/{api → sdk/api}/resources/dataPools/client/Client.ts +40 -8
- package/src/sdk/index.ts +4 -0
- package/uv.lock +340 -559
- /package/dist/{api → sdk/api}/errors/BadRequestError.d.ts +0 -0
- /package/dist/{api → sdk/api}/errors/BadRequestError.js +0 -0
- /package/dist/{api → sdk/api}/errors/ForbiddenError.d.ts +0 -0
- /package/dist/{api → sdk/api}/errors/ForbiddenError.js +0 -0
- /package/dist/{api → sdk/api}/errors/InternalServerError.d.ts +0 -0
- /package/dist/{api → sdk/api}/errors/InternalServerError.js +0 -0
- /package/dist/{api → sdk/api}/errors/NotFoundError.d.ts +0 -0
- /package/dist/{api → sdk/api}/errors/NotFoundError.js +0 -0
- /package/dist/{api → sdk/api}/errors/UnauthorizedError.d.ts +0 -0
- /package/dist/{api → sdk/api}/errors/UnauthorizedError.js +0 -0
- /package/dist/{api → sdk/api}/errors/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/errors/index.js +0 -0
- /package/dist/{api → sdk/api}/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/index.js +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/index.js +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/AddDataPoolFileRequest.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/AddDataPoolFileRequest.js +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/CreateDataPoolRequest.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/CreateDataPoolRequest.js +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/UpdateDataPoolRequest.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/UpdateDataPoolRequest.js +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/index.js +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/index.js +0 -0
- /package/dist/{api → sdk/api}/resources/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/index.js +0 -0
- /package/dist/{api → sdk/api}/types/DataPoolDto.d.ts +0 -0
- /package/dist/{api → sdk/api}/types/DataPoolDto.js +0 -0
- /package/dist/{api → sdk/api}/types/DataPoolFileDto.d.ts +0 -0
- /package/dist/{api → sdk/api}/types/DataPoolFileDto.js +0 -0
- /package/dist/{api → sdk/api}/types/OauthScope.d.ts +0 -0
- /package/dist/{api → sdk/api}/types/OauthScope.js +0 -0
- /package/dist/{api → sdk/api}/types/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/types/index.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/APIResponse.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/APIResponse.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/BinaryResponse.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/BinaryResponse.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/Fetcher.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/Fetcher.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/Headers.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/Headers.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/HttpResponsePromise.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/HttpResponsePromise.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/RawResponse.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/RawResponse.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/ResponseWithBody.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/ResponseWithBody.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/Supplier.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/Supplier.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/createRequestUrl.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/createRequestUrl.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/getErrorResponseBody.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/getErrorResponseBody.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/getFetchFn.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/getFetchFn.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/getHeader.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/getHeader.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/getRequestBody.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/getRequestBody.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/getResponseBody.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/getResponseBody.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/index.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/index.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/makeRequest.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/makeRequest.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/requestWithRetries.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/requestWithRetries.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/signals.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/signals.js +0 -0
- /package/dist/{core → sdk/core}/file.d.ts +0 -0
- /package/dist/{core → sdk/core}/file.js +0 -0
- /package/dist/{core → sdk/core}/form-data-utils/FormDataWrapper.d.ts +0 -0
- /package/dist/{core → sdk/core}/form-data-utils/FormDataWrapper.js +0 -0
- /package/dist/{core → sdk/core}/form-data-utils/encodeAsFormParameter.d.ts +0 -0
- /package/dist/{core → sdk/core}/form-data-utils/encodeAsFormParameter.js +0 -0
- /package/dist/{core → sdk/core}/form-data-utils/index.d.ts +0 -0
- /package/dist/{core → sdk/core}/form-data-utils/index.js +0 -0
- /package/dist/{core → sdk/core}/headers.d.ts +0 -0
- /package/dist/{core → sdk/core}/headers.js +0 -0
- /package/dist/{core → sdk/core}/index.d.ts +0 -0
- /package/dist/{core → sdk/core}/index.js +0 -0
- /package/dist/{core → sdk/core}/json.d.ts +0 -0
- /package/dist/{core → sdk/core}/json.js +0 -0
- /package/dist/{core → sdk/core}/runtime/index.d.ts +0 -0
- /package/dist/{core → sdk/core}/runtime/index.js +0 -0
- /package/dist/{core → sdk/core}/runtime/runtime.d.ts +0 -0
- /package/dist/{core → sdk/core}/runtime/runtime.js +0 -0
- /package/dist/{core → sdk/core}/url/index.d.ts +0 -0
- /package/dist/{core → sdk/core}/url/index.js +0 -0
- /package/dist/{core → sdk/core}/url/join.d.ts +0 -0
- /package/dist/{core → sdk/core}/url/join.js +0 -0
- /package/dist/{core → sdk/core}/url/qs.d.ts +0 -0
- /package/dist/{core → sdk/core}/url/qs.js +0 -0
- /package/dist/{environments.d.ts → sdk/environments.d.ts} +0 -0
- /package/dist/{environments.js → sdk/environments.js} +0 -0
- /package/dist/{errors → sdk/errors}/PlanqkApiError.d.ts +0 -0
- /package/dist/{errors → sdk/errors}/PlanqkApiError.js +0 -0
- /package/dist/{errors → sdk/errors}/PlanqkApiTimeoutError.d.ts +0 -0
- /package/dist/{errors → sdk/errors}/PlanqkApiTimeoutError.js +0 -0
- /package/dist/{errors → sdk/errors}/index.d.ts +0 -0
- /package/dist/{errors → sdk/errors}/index.js +0 -0
- /package/src/{api → sdk/api}/errors/BadRequestError.ts +0 -0
- /package/src/{api → sdk/api}/errors/ForbiddenError.ts +0 -0
- /package/src/{api → sdk/api}/errors/InternalServerError.ts +0 -0
- /package/src/{api → sdk/api}/errors/NotFoundError.ts +0 -0
- /package/src/{api → sdk/api}/errors/UnauthorizedError.ts +0 -0
- /package/src/{api → sdk/api}/errors/index.ts +0 -0
- /package/src/{api → sdk/api}/index.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/index.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/requests/AddDataPoolFileRequest.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/requests/CreateDataPoolRequest.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/requests/UpdateDataPoolRequest.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/requests/index.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/index.ts +0 -0
- /package/src/{api → sdk/api}/resources/index.ts +0 -0
- /package/src/{api → sdk/api}/types/DataPoolDto.ts +0 -0
- /package/src/{api → sdk/api}/types/DataPoolFileDto.ts +0 -0
- /package/src/{api → sdk/api}/types/OauthScope.ts +0 -0
- /package/src/{api → sdk/api}/types/index.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/APIResponse.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/BinaryResponse.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/Fetcher.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/Headers.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/HttpResponsePromise.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/RawResponse.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/ResponseWithBody.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/Supplier.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/createRequestUrl.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getErrorResponseBody.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getFetchFn.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getHeader.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getRequestBody.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getResponseBody.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/index.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/makeRequest.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/requestWithRetries.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/signals.ts +0 -0
- /package/src/{core → sdk/core}/file.ts +0 -0
- /package/src/{core → sdk/core}/form-data-utils/FormDataWrapper.ts +0 -0
- /package/src/{core → sdk/core}/form-data-utils/encodeAsFormParameter.ts +0 -0
- /package/src/{core → sdk/core}/form-data-utils/index.ts +0 -0
- /package/src/{core → sdk/core}/headers.ts +0 -0
- /package/src/{core → sdk/core}/index.ts +0 -0
- /package/src/{core → sdk/core}/json.ts +0 -0
- /package/src/{core → sdk/core}/runtime/index.ts +0 -0
- /package/src/{core → sdk/core}/runtime/runtime.ts +0 -0
- /package/src/{core → sdk/core}/url/index.ts +0 -0
- /package/src/{core → sdk/core}/url/join.ts +0 -0
- /package/src/{core → sdk/core}/url/qs.ts +0 -0
- /package/src/{environments.ts → sdk/environments.ts} +0 -0
- /package/src/{errors → sdk/errors}/PlanqkApiError.ts +0 -0
- /package/src/{errors → sdk/errors}/PlanqkApiTimeoutError.ts +0 -0
- /package/src/{errors → sdk/errors}/index.ts +0 -0
|
@@ -2,14 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
-
from .types import
|
|
5
|
+
from .types import (
|
|
6
|
+
AccessToken,
|
|
7
|
+
DataPoolDto,
|
|
8
|
+
DataPoolDtoCurrentUserPermission,
|
|
9
|
+
DataPoolFileDto,
|
|
10
|
+
OauthScope,
|
|
11
|
+
OrganizationMembership,
|
|
12
|
+
OrganizationMembershipAccountType,
|
|
13
|
+
OrganizationMembershipRole,
|
|
14
|
+
PersonalAccessTokenPrincipal,
|
|
15
|
+
PersonalAccessTokenPrincipalAccountType,
|
|
16
|
+
ServiceExecution,
|
|
17
|
+
ServiceExecutionStatus,
|
|
18
|
+
ServiceExecutionTokenPrincipal,
|
|
19
|
+
UserContext,
|
|
20
|
+
UserContextAccountType,
|
|
21
|
+
UserContextContextType,
|
|
22
|
+
)
|
|
6
23
|
from .errors import BadRequestError, ForbiddenError, InternalServerError, NotFoundError, UnauthorizedError
|
|
7
|
-
from . import data_pools
|
|
24
|
+
from . import authentication, data_pools
|
|
25
|
+
from .authentication import AuthorizeResponse
|
|
8
26
|
from .client import AsyncPlanqkApi, PlanqkApi
|
|
9
27
|
from .environment import PlanqkApiEnvironment
|
|
10
28
|
|
|
11
29
|
__all__ = [
|
|
30
|
+
"AccessToken",
|
|
12
31
|
"AsyncPlanqkApi",
|
|
32
|
+
"AuthorizeResponse",
|
|
13
33
|
"BadRequestError",
|
|
14
34
|
"DataPoolDto",
|
|
15
35
|
"DataPoolDtoCurrentUserPermission",
|
|
@@ -18,8 +38,20 @@ __all__ = [
|
|
|
18
38
|
"InternalServerError",
|
|
19
39
|
"NotFoundError",
|
|
20
40
|
"OauthScope",
|
|
41
|
+
"OrganizationMembership",
|
|
42
|
+
"OrganizationMembershipAccountType",
|
|
43
|
+
"OrganizationMembershipRole",
|
|
44
|
+
"PersonalAccessTokenPrincipal",
|
|
45
|
+
"PersonalAccessTokenPrincipalAccountType",
|
|
21
46
|
"PlanqkApi",
|
|
22
47
|
"PlanqkApiEnvironment",
|
|
48
|
+
"ServiceExecution",
|
|
49
|
+
"ServiceExecutionStatus",
|
|
50
|
+
"ServiceExecutionTokenPrincipal",
|
|
23
51
|
"UnauthorizedError",
|
|
52
|
+
"UserContext",
|
|
53
|
+
"UserContextAccountType",
|
|
54
|
+
"UserContextContextType",
|
|
55
|
+
"authentication",
|
|
24
56
|
"data_pools",
|
|
25
57
|
]
|
|
@@ -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,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]
|
package/planqk/api/sdk/client.py
CHANGED
|
@@ -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__(
|
|
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__(
|
|
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
|
|
|
@@ -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__ = [
|
|
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
|
+
]
|