Skip to content

Commit dd46f51

Browse files
authored
Merge pull request #1 from scaleway/add-v1alpha
Add v1alpha
2 parents b3b6233 + a09768a commit dd46f51

File tree

107 files changed

+68
-55
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+68
-55
lines changed

scaleway_qaas_client/__init__.py

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -11,52 +11,3 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
from .client import QaaSClient
15-
from .job_payload.models import (
16-
QaaSCircuitData,
17-
QaaSCircuitSerializationFormat,
18-
QaaSJobBackendData,
19-
QaaSJobClientData,
20-
QaaSJobData,
21-
QaaSJobRunData,
22-
)
23-
from .quantum_as_a_service_api_client.models import (
24-
ScalewayQaasV1Alpha1Application as QaaSApplication,
25-
)
26-
from .quantum_as_a_service_api_client.models import ScalewayQaasV1Alpha1Job as QaaSJob
27-
from .quantum_as_a_service_api_client.models import (
28-
ScalewayQaasV1Alpha1JobResult as QaaSJobResult,
29-
)
30-
from .quantum_as_a_service_api_client.models import (
31-
ScalewayQaasV1Alpha1JobResult as QaaSJobResut,
32-
)
33-
from .quantum_as_a_service_api_client.models import (
34-
ScalewayQaasV1Alpha1JobStatus as QaaSJobStatus,
35-
)
36-
from .quantum_as_a_service_api_client.models import (
37-
ScalewayQaasV1Alpha1Platform as QaaSPlatform,
38-
)
39-
from .quantum_as_a_service_api_client.models import (
40-
ScalewayQaasV1Alpha1PlatformAvailability as QaaSPlatformAvailability,
41-
)
42-
from .quantum_as_a_service_api_client.models import (
43-
ScalewayQaasV1Alpha1PlatformTechnology as QaaSPlatformTechnology,
44-
)
45-
from .quantum_as_a_service_api_client.models import (
46-
ScalewayQaasV1Alpha1Process as QaaSProcess,
47-
)
48-
from .quantum_as_a_service_api_client.models import (
49-
ScalewayQaasV1Alpha1ProcessResult as QaaSProcessResult,
50-
)
51-
from .quantum_as_a_service_api_client.models import (
52-
ScalewayQaasV1Alpha1ProcessStatus as QaaSProcessStatus,
53-
)
54-
from .quantum_as_a_service_api_client.models import (
55-
ScalewayQaasV1Alpha1Session as QaaSSession,
56-
)
57-
from .quantum_as_a_service_api_client.models import (
58-
ScalewayQaasV1Alpha1SessionStatus as QaaSSessionStatus,
59-
)
60-
from .quantum_as_a_service_api_client.models import (
61-
ScalewayQaasV1Alpha1SessionAccess as QaaSSessionAccess,
62-
)
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Copyright 2025 Scaleway
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
from .client import QaaSClient
15+
from .job_payload.models import (
16+
QaaSCircuitData,
17+
QaaSCircuitSerializationFormat,
18+
QaaSJobBackendData,
19+
QaaSJobClientData,
20+
QaaSJobData,
21+
QaaSJobRunData,
22+
)
23+
from .quantum_as_a_service_api_client.models import (
24+
ScalewayQaasV1Alpha1Application as QaaSApplication,
25+
)
26+
from .quantum_as_a_service_api_client.models import ScalewayQaasV1Alpha1Job as QaaSJob
27+
from .quantum_as_a_service_api_client.models import (
28+
ScalewayQaasV1Alpha1JobResult as QaaSJobResult,
29+
)
30+
from .quantum_as_a_service_api_client.models import (
31+
ScalewayQaasV1Alpha1JobResult as QaaSJobResut,
32+
)
33+
from .quantum_as_a_service_api_client.models import (
34+
ScalewayQaasV1Alpha1JobStatus as QaaSJobStatus,
35+
)
36+
from .quantum_as_a_service_api_client.models import (
37+
ScalewayQaasV1Alpha1Platform as QaaSPlatform,
38+
)
39+
from .quantum_as_a_service_api_client.models import (
40+
ScalewayQaasV1Alpha1PlatformAvailability as QaaSPlatformAvailability,
41+
)
42+
from .quantum_as_a_service_api_client.models import (
43+
ScalewayQaasV1Alpha1PlatformTechnology as QaaSPlatformTechnology,
44+
)
45+
from .quantum_as_a_service_api_client.models import (
46+
ScalewayQaasV1Alpha1Process as QaaSProcess,
47+
)
48+
from .quantum_as_a_service_api_client.models import (
49+
ScalewayQaasV1Alpha1ProcessResult as QaaSProcessResult,
50+
)
51+
from .quantum_as_a_service_api_client.models import (
52+
ScalewayQaasV1Alpha1ProcessStatus as QaaSProcessStatus,
53+
)
54+
from .quantum_as_a_service_api_client.models import (
55+
ScalewayQaasV1Alpha1Session as QaaSSession,
56+
)
57+
from .quantum_as_a_service_api_client.models import (
58+
ScalewayQaasV1Alpha1SessionStatus as QaaSSessionStatus,
59+
)
60+
from .quantum_as_a_service_api_client.models import (
61+
ScalewayQaasV1Alpha1SessionAccess as QaaSSessionAccess,
62+
)

scaleway_qaas_client/client.py renamed to scaleway_qaas_client/v1alpha1/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def __init__(self, project_id: str, secret_key: str, url: str = _DEFAULT_URL):
121121
raise Exception("QaasClient: secret_key cannot be None")
122122

123123
self.__project_id = project_id
124-
url = url if url else _DEFAULT_URL
124+
url = url or _DEFAULT_URL
125125

126126
self.__client = AuthenticatedClient(
127127
base_url=url,
@@ -226,7 +226,7 @@ def create_session(
226226
if not platform_id:
227227
raise Exception("create_session: platform_id cannot be None")
228228

229-
name = name if name else f"qs-{randomname.get_name()}"
229+
name = name or f"qs-{randomname.get_name()}"
230230

231231
if isinstance(max_duration, str):
232232
max_duration = f"{timeparse(max_duration)}s"
@@ -403,7 +403,7 @@ def create_job(
403403
raise Exception("create_job: payload cannot be None")
404404

405405
payload = payload if isinstance(payload, str) else json.dumps(payload)
406-
name = name if name else f"qj-{randomname.get_name()}"
406+
name = name or f"qj-{randomname.get_name()}"
407407

408408
response = _create_job_sync(
409409
client=self.__client,
@@ -588,7 +588,7 @@ def create_process(
588588
if not input:
589589
raise Exception("create_process: input cannot be None")
590590

591-
name = name if name else f"qp-{randomname.get_name()}"
591+
name = name or f"qp-{randomname.get_name()}"
592592

593593
input = input if isinstance(input, str) else json.dumps(input)
594594

0 commit comments

Comments
 (0)