c2client 0.24__tar.gz → 0.25__tar.gz
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.
- {c2client-0.24/c2client.egg-info → c2client-0.25}/PKG-INFO +4 -3
- {c2client-0.24 → c2client-0.25}/README.rst +2 -2
- c2client-0.25/c2client/__init__.py +1 -0
- {c2client-0.24 → c2client-0.25}/c2client/errors.py +5 -0
- {c2client-0.24 → c2client-0.25}/c2client/utils.py +9 -5
- {c2client-0.24 → c2client-0.25/c2client.egg-info}/PKG-INFO +4 -3
- {c2client-0.24 → c2client-0.25}/setup.py +1 -0
- c2client-0.24/c2client/__init__.py +0 -1
- {c2client-0.24 → c2client-0.25}/MANIFEST.in +0 -0
- {c2client-0.24 → c2client-0.25}/Makefile +0 -0
- {c2client-0.24 → c2client-0.25}/c2client/c2rc_convert.py +0 -0
- {c2client-0.24 → c2client-0.25}/c2client/clients.py +0 -0
- {c2client-0.24 → c2client-0.25}/c2client.egg-info/SOURCES.txt +0 -0
- {c2client-0.24 → c2client-0.25}/c2client.egg-info/dependency_links.txt +0 -0
- {c2client-0.24 → c2client-0.25}/c2client.egg-info/entry_points.txt +0 -0
- {c2client-0.24 → c2client-0.25}/c2client.egg-info/requires.txt +0 -0
- {c2client-0.24 → c2client-0.25}/c2client.egg-info/top_level.txt +0 -0
- {c2client-0.24 → c2client-0.25}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: c2client
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.25
|
|
4
4
|
Summary: CROC Cloud Platform - API Client
|
|
5
5
|
Home-page: https://github.com/c2devel/c2-client
|
|
6
6
|
Author: CROC Cloud Team
|
|
@@ -22,11 +22,12 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
K2 Cloud API Client
|
|
27
28
|
=====================
|
|
28
29
|
|
|
29
|
-
Simple command-line utility for sending custom requests to
|
|
30
|
+
Simple command-line utility for sending custom requests to K2 Cloud platform.
|
|
30
31
|
|
|
31
32
|
**Warning: this utility is not intended for automation cases.
|
|
32
33
|
Use https://github.com/c2devel/boto3.git and python scripts instead.**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
K2 Cloud API Client
|
|
2
2
|
=====================
|
|
3
3
|
|
|
4
|
-
Simple command-line utility for sending custom requests to
|
|
4
|
+
Simple command-line utility for sending custom requests to K2 Cloud platform.
|
|
5
5
|
|
|
6
6
|
**Warning: this utility is not intended for automation cases.
|
|
7
7
|
Use https://github.com/c2devel/boto3.git and python scripts instead.**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.25"
|
|
@@ -20,3 +20,8 @@ class InvalidParameterName(Exception):
|
|
|
20
20
|
class InvalidMethodName(Exception):
|
|
21
21
|
def __init__(self, method_name: str) -> None:
|
|
22
22
|
super().__init__(f"Not found method by name: {method_name}.")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class InvalidListIndex(Exception):
|
|
26
|
+
def __init__(self, index: int) -> None:
|
|
27
|
+
super().__init__(f"The list's indices start at 1, and {index} is outside that range.")
|
|
@@ -4,7 +4,12 @@ from typing import Any, Dict
|
|
|
4
4
|
|
|
5
5
|
from botocore.model import ListShape, StructureShape, Shape
|
|
6
6
|
|
|
7
|
-
from c2client.errors import
|
|
7
|
+
from c2client.errors import (
|
|
8
|
+
EnvironmentVariableError,
|
|
9
|
+
MalformedParametersError,
|
|
10
|
+
InvalidParameterName,
|
|
11
|
+
InvalidListIndex,
|
|
12
|
+
)
|
|
8
13
|
|
|
9
14
|
|
|
10
15
|
@dataclasses.dataclass
|
|
@@ -31,10 +36,7 @@ def from_dot_notation(source):
|
|
|
31
36
|
|
|
32
37
|
result = {"result": {}}
|
|
33
38
|
for key, value in sorted(source.items()):
|
|
34
|
-
|
|
35
|
-
_process_tokens(key.split("."), value, result, "result")
|
|
36
|
-
except Exception:
|
|
37
|
-
raise MalformedParametersError
|
|
39
|
+
_process_tokens(key.split("."), value, result, "result")
|
|
38
40
|
return result["result"]
|
|
39
41
|
|
|
40
42
|
|
|
@@ -42,6 +44,8 @@ def _process_tokens(tokens, value, parent, index):
|
|
|
42
44
|
key, rest = tokens[0], tokens[1:]
|
|
43
45
|
if key.isdigit():
|
|
44
46
|
key = int(key) - 1
|
|
47
|
+
if key == -1:
|
|
48
|
+
raise InvalidListIndex(0)
|
|
45
49
|
|
|
46
50
|
if not isinstance(key, int):
|
|
47
51
|
parent[index].setdefault(key, {})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: c2client
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.25
|
|
4
4
|
Summary: CROC Cloud Platform - API Client
|
|
5
5
|
Home-page: https://github.com/c2devel/c2-client
|
|
6
6
|
Author: CROC Cloud Team
|
|
@@ -22,11 +22,12 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
K2 Cloud API Client
|
|
27
28
|
=====================
|
|
28
29
|
|
|
29
|
-
Simple command-line utility for sending custom requests to
|
|
30
|
+
Simple command-line utility for sending custom requests to K2 Cloud platform.
|
|
30
31
|
|
|
31
32
|
**Warning: this utility is not intended for automation cases.
|
|
32
33
|
Use https://github.com/c2devel/boto3.git and python scripts instead.**
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.24"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|