qmenta-core 4.1.dev704__tar.gz → 4.1.dev705__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.
Potentially problematic release.
This version of qmenta-core might be problematic. Click here for more details.
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/PKG-INFO +1 -1
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/pyproject.toml +1 -1
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/src/qmenta/core/platform.py +14 -10
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/README.md +0 -0
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/src/qmenta/__init__.py +0 -0
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/src/qmenta/core/.gitignore +0 -0
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/src/qmenta/core/__init__.py +0 -0
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/src/qmenta/core/auth.py +0 -0
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/src/qmenta/core/errors.py +0 -0
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/src/qmenta/core/upload/__init__.py +0 -0
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/src/qmenta/core/upload/multi.py +0 -0
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/src/qmenta/core/upload/prepare.py +0 -0
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/src/qmenta/core/upload/single.py +0 -0
- {qmenta_core-4.1.dev704 → qmenta_core-4.1.dev705}/src/qmenta/py.typed +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import requests
|
|
2
|
-
from urllib.parse import urljoin
|
|
3
|
-
from typing import Dict, Any
|
|
4
|
-
|
|
5
2
|
from qmenta.core.auth import Auth
|
|
6
3
|
from qmenta.core.errors import (
|
|
7
4
|
ActionFailedError,
|
|
8
5
|
ConnectionError,
|
|
9
6
|
InvalidResponseError,
|
|
10
7
|
)
|
|
8
|
+
from typing import Dict, Any, List
|
|
9
|
+
from urllib.parse import urljoin
|
|
11
10
|
|
|
12
11
|
"""
|
|
13
12
|
Handles all the communication with the QMENTA platform.
|
|
@@ -22,16 +21,19 @@ class ChooseDataError(ActionFailedError):
|
|
|
22
21
|
----------
|
|
23
22
|
warning : str
|
|
24
23
|
Warning message returned by the platform
|
|
25
|
-
data_to_choose :
|
|
24
|
+
data_to_choose : dict
|
|
26
25
|
Specification of the data to choose returned by the platform
|
|
27
26
|
analysis_id : int
|
|
28
27
|
The ID of the analysis for which data needs to be chosen,
|
|
29
28
|
returned by the platform.
|
|
30
29
|
"""
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
|
|
31
|
+
def __init__(
|
|
32
|
+
self, warning: str, data_to_choose: Dict[str, List[str]]
|
|
33
|
+
, analysis_id: int
|
|
34
|
+
) -> None:
|
|
33
35
|
self.warning: str = warning
|
|
34
|
-
self.data_to_choose:
|
|
36
|
+
self.data_to_choose: dict = data_to_choose
|
|
35
37
|
self.analysis_id: int = analysis_id
|
|
36
38
|
|
|
37
39
|
|
|
@@ -133,9 +135,11 @@ def parse_response(response: requests.Response) -> Any:
|
|
|
133
135
|
return result
|
|
134
136
|
|
|
135
137
|
|
|
136
|
-
def post(
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
def post(
|
|
139
|
+
auth: Auth, endpoint: str, data: Dict[str, Any] = {},
|
|
140
|
+
headers: Dict[str, Any] = {}, stream: bool = False,
|
|
141
|
+
timeout: float = 30.0
|
|
142
|
+
) -> requests.Response:
|
|
139
143
|
"""
|
|
140
144
|
Post the given data and headers to the specified platform's endpoint.
|
|
141
145
|
|
|
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
|
|
File without changes
|