Skip to content

Commit 62fc842

Browse files
committed
feat(client): fix client
1 parent 7928024 commit 62fc842

File tree

3 files changed

+419
-0
lines changed

3 files changed

+419
-0
lines changed

scaleway_qaas_client/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def __init__(self, project_id: str, secret_key: str, url: str = _DEFAULT_URL):
8888
raise Exception("QaasClient: secret_key cannot be None")
8989

9090
self.__project_id = project_id
91+
url = url if url else _DEFAULT_URL
9192

9293
self.__client = AuthenticatedClient(
9394
base_url=url,

scaleway_qaas_client/versions.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
import importlib.metadata
15+
import platform
16+
17+
from typing import Final
18+
19+
SCALEWAY_QAAS_CLIENT_VERSION: Final = importlib.metadata.version("scaleway-qaas-client")
20+
21+
__version__: Final = SCALEWAY_QAAS_CLIENT_VERSION
22+
23+
USER_AGENT: Final = " ".join(
24+
[
25+
f"scaleway-qaas-client/{SCALEWAY_QAAS_CLIENT_VERSION}",
26+
f"({platform.system()}; {platform.python_implementation()}/{platform.python_version()})",
27+
]
28+
)

0 commit comments

Comments
 (0)