NGPIris 5.5.0__tar.gz → 5.5.2__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.
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/hci/hci.py +18 -11
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/hcp/hcp.py +1 -1
- {ngpiris-5.5.0 → ngpiris-5.5.2/NGPIris.egg-info}/PKG-INFO +2 -2
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris.egg-info/requires.txt +1 -1
- {ngpiris-5.5.0/NGPIris.egg-info → ngpiris-5.5.2}/PKG-INFO +2 -2
- {ngpiris-5.5.0 → ngpiris-5.5.2}/pyproject.toml +3 -3
- {ngpiris-5.5.0 → ngpiris-5.5.2}/LICENSE +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/MANIFEST.in +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/__init__.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/cli/__init__.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/hci/__init__.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/hci/exceptions.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/hci/helpers.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/hcp/__init__.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/hcp/exceptions.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/hcp/helpers.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/hcp/statistics.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/parse_credentials/__init__.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/parse_credentials/parse_credentials.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/utils/__init__.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris/utils/utils.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris.egg-info/SOURCES.txt +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris.egg-info/dependency_links.txt +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris.egg-info/entry_points.txt +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/NGPIris.egg-info/top_level.txt +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/README.md +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/docs/IRIS_5_changelog.md +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/docs/Makefile +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/docs/NGPIris.cli.rst +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/docs/NGPIris.hci.rst +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/docs/NGPIris.hcp.rst +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/docs/NGPIris.parse_credentials.rst +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/docs/NGPIris.rst +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/docs/NGPIris.utils.rst +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/docs/Tutorial.md +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/docs/conf.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/docs/index.rst +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/docs/make.bat +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/docs/modules.rst +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/setup.cfg +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/data/80MB_test_file +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/data/a folder of data/80MB_test_file_0 +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/data/a folder of data/80MB_test_file_1 +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/data/complete_creds_0.json +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/data/complete_creds_1.json +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/data/complete_creds_2.json +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/data/incomplete_creds_0.json +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/data/incomplete_creds_1.json +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/data/incomplete_creds_2.json +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/data/incomplete_creds_3.json +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/data/incomplete_creds_4.json +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/test_hci.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/test_hcp.py +0 -0
- {ngpiris-5.5.0 → ngpiris-5.5.2}/tests/test_parse_credentials.py +0 -0
|
@@ -14,25 +14,32 @@ from urllib3 import disable_warnings
|
|
|
14
14
|
from json import load
|
|
15
15
|
|
|
16
16
|
class HCIHandler:
|
|
17
|
-
def __init__(self,
|
|
17
|
+
def __init__(self, credentials : str | dict[str, str], use_ssl : bool = False) -> None:
|
|
18
18
|
"""
|
|
19
19
|
Class for handling HCI requests.
|
|
20
20
|
|
|
21
|
-
:param credentials_path:
|
|
22
|
-
:type credentials_path: str
|
|
21
|
+
:param credentials_path: If `credentials` is a `str`, then it will be interpreted as a path to the JSON credentials file. If `credentials` is a `dict`, then a dictionary with the appropriate HCI credentials is expected: ```{"username" : "", "password" : "", "address" : "", "auth_port" : "", "api_port" : ""}```
|
|
22
|
+
:type credentials_path: str | dict[str, str]
|
|
23
23
|
|
|
24
24
|
:param use_ssl: Boolean choice between using SSL, defaults to False
|
|
25
25
|
:type use_ssl: bool, optional
|
|
26
26
|
"""
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
if type(credentials) is str:
|
|
28
|
+
credentials_handler = CredentialsHandler(credentials)
|
|
29
|
+
self.hci = credentials_handler.hci
|
|
30
|
+
|
|
31
|
+
self.username = self.hci["username"]
|
|
32
|
+
self.password = self.hci["password"]
|
|
33
|
+
self.address = self.hci["address"]
|
|
34
|
+
self.auth_port = self.hci["auth_port"]
|
|
35
|
+
self.api_port = self.hci["api_port"]
|
|
36
|
+
elif type(credentials) is dict:
|
|
37
|
+
self.username = credentials["username"]
|
|
38
|
+
self.password = credentials["password"]
|
|
39
|
+
self.address = credentials["address"]
|
|
40
|
+
self.auth_port = credentials["auth_port"]
|
|
41
|
+
self.api_port = credentials["api_port"]
|
|
29
42
|
|
|
30
|
-
self.username = self.hci["username"]
|
|
31
|
-
self.password = self.hci["password"]
|
|
32
|
-
self.address = self.hci["address"]
|
|
33
|
-
self.auth_port = self.hci["auth_port"]
|
|
34
|
-
self.api_port = self.hci["api_port"]
|
|
35
|
-
|
|
36
43
|
self.token = ""
|
|
37
44
|
|
|
38
45
|
self.use_ssl = use_ssl
|
|
@@ -55,7 +55,7 @@ class HCPHandler:
|
|
|
55
55
|
Class for handling HCP requests.
|
|
56
56
|
|
|
57
57
|
:param credentials: If `credentials` is a `str`, then it will be interpreted as a path to the JSON credentials file. If `credentials` is a `dict`, then a dictionary with the appropriate HCP credentials is expected: ```{"endpoint" : "", "aws_access_key_id" : "", "aws_secret_access_key" : "" }```
|
|
58
|
-
:type credentials: str | dict
|
|
58
|
+
:type credentials: str | dict[str, str]
|
|
59
59
|
|
|
60
60
|
:param use_ssl: Boolean choice between using SSL, defaults to False
|
|
61
61
|
:type use_ssl: bool, optional
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: NGPIris
|
|
3
|
-
Version: 5.5.
|
|
3
|
+
Version: 5.5.2
|
|
4
4
|
Author-email: Erik Brink <erik.brink@gu.se>, Isak Sylvin <isak.sylvin@gu.se>
|
|
5
5
|
Description-Content-Type: text/markdown
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Requires-Dist: requests>=2.31.0
|
|
8
|
-
Requires-Dist: urllib3==2.
|
|
8
|
+
Requires-Dist: urllib3==2.6.0
|
|
9
9
|
Requires-Dist: boto3==1.35.81
|
|
10
10
|
Requires-Dist: parse>=1.19.1
|
|
11
11
|
Requires-Dist: RapidFuzz>=3.10.1
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: NGPIris
|
|
3
|
-
Version: 5.5.
|
|
3
|
+
Version: 5.5.2
|
|
4
4
|
Author-email: Erik Brink <erik.brink@gu.se>, Isak Sylvin <isak.sylvin@gu.se>
|
|
5
5
|
Description-Content-Type: text/markdown
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Requires-Dist: requests>=2.31.0
|
|
8
|
-
Requires-Dist: urllib3==2.
|
|
8
|
+
Requires-Dist: urllib3==2.6.0
|
|
9
9
|
Requires-Dist: boto3==1.35.81
|
|
10
10
|
Requires-Dist: parse>=1.19.1
|
|
11
11
|
Requires-Dist: RapidFuzz>=3.10.1
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "NGPIris"
|
|
3
|
-
version = "5.5.
|
|
3
|
+
version = "5.5.2"
|
|
4
4
|
readme = "README.md"
|
|
5
5
|
dependencies = [
|
|
6
6
|
"requests >= 2.31.0",
|
|
7
|
-
"urllib3 == 2.
|
|
7
|
+
"urllib3 == 2.6.0",
|
|
8
8
|
"boto3 == 1.35.81",
|
|
9
9
|
"parse >= 1.19.1",
|
|
10
10
|
"RapidFuzz >= 3.10.1",
|
|
@@ -41,4 +41,4 @@ filterwarnings = "ignore::urllib3.connectionpool.InsecureRequestWarning"
|
|
|
41
41
|
|
|
42
42
|
[project.scripts]
|
|
43
43
|
iris = "NGPIris.cli:cli"
|
|
44
|
-
iris_generate_credentials_file = "NGPIris.cli:iris_generate_credentials_file"
|
|
44
|
+
iris_generate_credentials_file = "NGPIris.cli:iris_generate_credentials_file"
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|