aplos-nca-saas-sdk 0.0.1__py3-none-any.whl
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.
- aplos_nca_saas_sdk/__init__.py +0 -0
- aplos_nca_saas_sdk/aws_resources/aws_cognito.py +188 -0
- aplos_nca_saas_sdk/aws_resources/aws_s3_presigned_payload.py +49 -0
- aplos_nca_saas_sdk/aws_resources/aws_s3_presigned_upload.py +116 -0
- aplos_nca_saas_sdk/files/analysis_files/single_ev/configuration_single_ev.json +51 -0
- aplos_nca_saas_sdk/files/analysis_files/single_ev/meta_data.json +17 -0
- aplos_nca_saas_sdk/files/analysis_files/single_ev/single_ev.csv +121 -0
- aplos_nca_saas_sdk/integration_testing/integration_test_base.py +34 -0
- aplos_nca_saas_sdk/integration_testing/integration_test_factory.py +62 -0
- aplos_nca_saas_sdk/integration_testing/integration_test_suite.py +84 -0
- aplos_nca_saas_sdk/integration_testing/main.py +28 -0
- aplos_nca_saas_sdk/integration_testing/readme.md +18 -0
- aplos_nca_saas_sdk/integration_testing/tests/app_configuration_test.py +30 -0
- aplos_nca_saas_sdk/integration_testing/tests/app_execution_test.py +5 -0
- aplos_nca_saas_sdk/integration_testing/tests/app_login_test.py +32 -0
- aplos_nca_saas_sdk/integration_testing/tests/app_validation_test.py +5 -0
- aplos_nca_saas_sdk/nca_resources/nca_app_configuration.py +69 -0
- aplos_nca_saas_sdk/nca_resources/nca_endpoints.py +54 -0
- aplos_nca_saas_sdk/nca_resources/nca_executions.py +378 -0
- aplos_nca_saas_sdk/nca_resources/nca_login.py +104 -0
- aplos_nca_saas_sdk/utilities/commandline_args.py +332 -0
- aplos_nca_saas_sdk/utilities/environment_services.py +81 -0
- aplos_nca_saas_sdk/utilities/environment_vars.py +23 -0
- aplos_nca_saas_sdk/utilities/http_utility.py +30 -0
- aplos_nca_saas_sdk/version.py +4 -0
- aplos_nca_saas_sdk-0.0.1.dist-info/METADATA +49 -0
- aplos_nca_saas_sdk-0.0.1.dist-info/RECORD +29 -0
- aplos_nca_saas_sdk-0.0.1.dist-info/WHEEL +4 -0
- aplos_nca_saas_sdk-0.0.1.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,332 @@
|
|
1
|
+
import os
|
2
|
+
import argparse
|
3
|
+
import getpass
|
4
|
+
from pathlib import Path
|
5
|
+
from typing import List
|
6
|
+
from aplos_nca_saas_sdk.utilities.environment_vars import EnvironmentVars
|
7
|
+
from dotenv import load_dotenv
|
8
|
+
|
9
|
+
# load the environment (.env) file if any
|
10
|
+
# this may or may not be the desired results
|
11
|
+
load_dotenv(override=True)
|
12
|
+
|
13
|
+
|
14
|
+
class CommandlineArgs:
|
15
|
+
def __init__(self) -> None:
|
16
|
+
# command line args
|
17
|
+
self.parser = argparse.ArgumentParser(
|
18
|
+
description="Example script to demonstrate command line argument parsing."
|
19
|
+
)
|
20
|
+
|
21
|
+
# Add the arguments
|
22
|
+
self.parser.add_argument(
|
23
|
+
"-u", "--username", required=False, help="The username"
|
24
|
+
)
|
25
|
+
self.parser.add_argument(
|
26
|
+
"-p", "--password", required=False, help="The password"
|
27
|
+
)
|
28
|
+
self.parser.add_argument(
|
29
|
+
"-c", "--config-file", required=False, help="Path to the configuration file"
|
30
|
+
)
|
31
|
+
self.parser.add_argument(
|
32
|
+
"-f", "--analyis-file", required=False, help="Path to the analysis file"
|
33
|
+
)
|
34
|
+
self.parser.add_argument(
|
35
|
+
"-m", "--metadata-file", required=False, help="Path to the metadata file"
|
36
|
+
)
|
37
|
+
|
38
|
+
self.parser.add_argument("-a", "--api-url", required=False, help="The api url")
|
39
|
+
self.parser.add_argument(
|
40
|
+
"-i", "--client-id", required=False, help="The client id to cognito"
|
41
|
+
)
|
42
|
+
|
43
|
+
self.parser.add_argument(
|
44
|
+
"-v", "--verbose", required=False, help="Detailed logging information"
|
45
|
+
)
|
46
|
+
|
47
|
+
self.parser.add_argument(
|
48
|
+
"-r", "--region", required=False, help="AWS Region. For Cognito Login"
|
49
|
+
)
|
50
|
+
|
51
|
+
self.parser.add_argument(
|
52
|
+
"-s",
|
53
|
+
"--skip",
|
54
|
+
required=False,
|
55
|
+
action="store_true",
|
56
|
+
help="Skip prompts if required values have defaults",
|
57
|
+
)
|
58
|
+
self.parser.add_argument(
|
59
|
+
"-o",
|
60
|
+
"--output-directory",
|
61
|
+
required=False,
|
62
|
+
help="The full path to an output directory",
|
63
|
+
)
|
64
|
+
|
65
|
+
self.parser.add_argument(
|
66
|
+
"-e",
|
67
|
+
"--environment-file",
|
68
|
+
required=False,
|
69
|
+
help="The full path to an environment file (.env file).",
|
70
|
+
)
|
71
|
+
|
72
|
+
self.username: str | None = None
|
73
|
+
self.password: str | None = None
|
74
|
+
self.api_domain: str | None = None
|
75
|
+
self.cognito_client_id: str | None = None
|
76
|
+
self.aws_region: str | None = None
|
77
|
+
|
78
|
+
self.config_file: str | None = None
|
79
|
+
self.config_file_default: str | None = None
|
80
|
+
self.analysis_file: str | None = None
|
81
|
+
self.analysis_file_default: str | None = None
|
82
|
+
self.metadata_file: str | None = None
|
83
|
+
self.metadata_file_default: str | None = None
|
84
|
+
self.skip: bool = False
|
85
|
+
self.output_directory: str | None = None
|
86
|
+
self.output_directory_default: str = ".output"
|
87
|
+
self.environment_file: str | None = None
|
88
|
+
|
89
|
+
self.display_directions: bool = True
|
90
|
+
|
91
|
+
def is_valid(self) -> bool:
|
92
|
+
"""
|
93
|
+
Validates and Prompts the user if needed
|
94
|
+
Returns:
|
95
|
+
bool: True if they are all valid
|
96
|
+
"""
|
97
|
+
# see if we have any aruments
|
98
|
+
args = self.parser.parse_args()
|
99
|
+
|
100
|
+
self.username = args.username
|
101
|
+
self.password = args.password
|
102
|
+
self.config_file = args.config_file
|
103
|
+
# anything with a dash (in the args) is accessed with an underscore
|
104
|
+
self.analysis_file = args.analyis_file
|
105
|
+
self.api_domain = args.api_domain
|
106
|
+
self.cognito_client_id = args.client_id
|
107
|
+
self.aws_region = args.region
|
108
|
+
self.metadata_file = args.metadata_file
|
109
|
+
self.skip = args.skip
|
110
|
+
self.output_directory = args.output_directory
|
111
|
+
self.environment_file = args.environment_file
|
112
|
+
# no args check to see if they have them in the environmet
|
113
|
+
|
114
|
+
# if we have an environment file we'll want to load it before checking any defaults
|
115
|
+
self.check_for_environment_config()
|
116
|
+
|
117
|
+
env = EnvironmentVars()
|
118
|
+
|
119
|
+
if not self.username:
|
120
|
+
if self.skip and env.username:
|
121
|
+
self.username = env.username
|
122
|
+
else:
|
123
|
+
self.username = self.prompt_for_input("username", env.username)
|
124
|
+
if not self.password:
|
125
|
+
if self.skip and env.password:
|
126
|
+
self.password = env.password
|
127
|
+
else:
|
128
|
+
self.password = self.prompt_for_input(
|
129
|
+
"password", env.password, is_sensitive=True
|
130
|
+
)
|
131
|
+
if not self.aws_region:
|
132
|
+
if self.skip and env.aws_region:
|
133
|
+
self.aws_region = env.aws_region
|
134
|
+
else:
|
135
|
+
self.aws_region = self.prompt_for_input("AWS Region", env.aws_region)
|
136
|
+
if not self.api_domain:
|
137
|
+
if self.skip and env.api_domain:
|
138
|
+
self.api_domain = env.api_domain
|
139
|
+
else:
|
140
|
+
self.api_domain = self.prompt_for_input("Api Domain", env.api_domain)
|
141
|
+
|
142
|
+
if not self.cognito_client_id:
|
143
|
+
if self.skip and env.client_id:
|
144
|
+
self.cognito_client_id = env.client_id
|
145
|
+
else:
|
146
|
+
self.cognito_client_id = self.prompt_for_input(
|
147
|
+
"Cognito Client Id", env.client_id
|
148
|
+
)
|
149
|
+
|
150
|
+
if not self.analysis_file:
|
151
|
+
if self.skip and self.analysis_file_default or env.analysis_file:
|
152
|
+
self.analysis_file = self.analysis_file_default or env.analysis_file
|
153
|
+
else:
|
154
|
+
self.analysis_file = self.prompt_for_input(
|
155
|
+
"Analysis File", self.analysis_file_default or env.analysis_file
|
156
|
+
)
|
157
|
+
|
158
|
+
if not self.config_file:
|
159
|
+
if self.skip and self.config_file_default or env.config_file:
|
160
|
+
self.config_file = self.config_file_default or env.config_file
|
161
|
+
else:
|
162
|
+
self.config_file = self.prompt_for_input(
|
163
|
+
"Configuration File", self.config_file_default or env.config_file
|
164
|
+
)
|
165
|
+
|
166
|
+
if not self.metadata_file:
|
167
|
+
if self.skip and self.metadata_file_default or env.metadata_file:
|
168
|
+
self.metadata_file = self.metadata_file_default or env.metadata_file
|
169
|
+
else:
|
170
|
+
self.metadata_file = self.prompt_for_input(
|
171
|
+
"MetaData File",
|
172
|
+
self.metadata_file_default or env.metadata_file,
|
173
|
+
required=False,
|
174
|
+
)
|
175
|
+
if not self.output_directory:
|
176
|
+
if self.skip:
|
177
|
+
self.output_directory = self.output_directory_default
|
178
|
+
else:
|
179
|
+
self.output_directory = self.prompt_for_input(
|
180
|
+
"Output directory (the full path)",
|
181
|
+
self.output_directory_default,
|
182
|
+
required=False,
|
183
|
+
)
|
184
|
+
|
185
|
+
# do we have everything we need?
|
186
|
+
|
187
|
+
return self.__check_all_required()
|
188
|
+
|
189
|
+
def __check_all_required(self) -> bool:
|
190
|
+
"""
|
191
|
+
Check to see if all the fields are required
|
192
|
+
Returns:
|
193
|
+
bool: True if all required fields are populated, otherwise false
|
194
|
+
"""
|
195
|
+
# basically everything except metadata
|
196
|
+
required_fields = [
|
197
|
+
self.username,
|
198
|
+
self.password,
|
199
|
+
self.aws_region,
|
200
|
+
self.cognito_client_id,
|
201
|
+
self.analysis_file,
|
202
|
+
self.config_file,
|
203
|
+
self.api_domain,
|
204
|
+
]
|
205
|
+
for field in required_fields:
|
206
|
+
if not field:
|
207
|
+
return False
|
208
|
+
|
209
|
+
return True
|
210
|
+
|
211
|
+
def prompt_for_input(
|
212
|
+
self,
|
213
|
+
prompt: str,
|
214
|
+
default: str | None = None,
|
215
|
+
is_sensitive: bool = False,
|
216
|
+
required: bool = True,
|
217
|
+
) -> str | None:
|
218
|
+
"""
|
219
|
+
Create a prompt to display
|
220
|
+
Args:
|
221
|
+
prompt (str): The Prompt
|
222
|
+
default (str | None, optional): Default Value. Defaults to None.
|
223
|
+
is_sensitive (bool, optional): If the data is sensitive it won't be displayed on the screen. Defaults to False.
|
224
|
+
required (bool, optional): If the field is required. Defaults to True.
|
225
|
+
|
226
|
+
Returns:
|
227
|
+
str | None: The result of the prompt
|
228
|
+
"""
|
229
|
+
# Construct the prompt message to include the default option if provided
|
230
|
+
if self.display_directions:
|
231
|
+
self.display_directions = False
|
232
|
+
print("Hit enter if you wish to accept a default value (if available)")
|
233
|
+
print("")
|
234
|
+
default_display = default if not is_sensitive else "************"
|
235
|
+
required_display = " - Required" if required else " - Optional"
|
236
|
+
|
237
|
+
display = (
|
238
|
+
f" [{default_display}]: "
|
239
|
+
if default
|
240
|
+
else f" [No Default{required_display}]: "
|
241
|
+
)
|
242
|
+
user_input: str | None = None
|
243
|
+
if is_sensitive:
|
244
|
+
user_input = getpass.getpass(f"{prompt}{display}")
|
245
|
+
else:
|
246
|
+
prompt_message = f"{prompt}{display}"
|
247
|
+
|
248
|
+
# Get user input
|
249
|
+
user_input = input(prompt_message)
|
250
|
+
|
251
|
+
# Return the user input if not empty, otherwise return the default value
|
252
|
+
user_input = user_input if user_input else default
|
253
|
+
|
254
|
+
if not user_input and required:
|
255
|
+
return self.prompt_for_input(
|
256
|
+
prompt=prompt,
|
257
|
+
default=default,
|
258
|
+
is_sensitive=is_sensitive,
|
259
|
+
required=required,
|
260
|
+
)
|
261
|
+
|
262
|
+
return user_input
|
263
|
+
|
264
|
+
def find_file(
|
265
|
+
self, starting_path: str, file_name: str, raise_error_if_not_found: bool = True
|
266
|
+
) -> str | None:
|
267
|
+
"""Searches the project directory structor for a file"""
|
268
|
+
parents = 10
|
269
|
+
starting_path = starting_path or __file__
|
270
|
+
|
271
|
+
paths: List[str] = []
|
272
|
+
for parent in range(parents):
|
273
|
+
path = Path(starting_path).parents[parent].absolute()
|
274
|
+
|
275
|
+
tmp = os.path.join(path, file_name)
|
276
|
+
paths.append(tmp)
|
277
|
+
if os.path.exists(tmp):
|
278
|
+
return tmp
|
279
|
+
|
280
|
+
if raise_error_if_not_found:
|
281
|
+
searched_paths = "\n".join(paths)
|
282
|
+
raise RuntimeError(
|
283
|
+
f"Failed to locate environment file: {file_name} in: \n {searched_paths}"
|
284
|
+
)
|
285
|
+
|
286
|
+
return None
|
287
|
+
|
288
|
+
def check_for_environment_config(self):
|
289
|
+
"""Attempts to load an environment file"""
|
290
|
+
if not self.environment_file:
|
291
|
+
return # Exit early if no environment file is provided
|
292
|
+
|
293
|
+
env_file_path = Path(self.environment_file)
|
294
|
+
|
295
|
+
if not env_file_path.exists():
|
296
|
+
# Try to find the file
|
297
|
+
file = self.find_file(__file__, env_file_path.name)
|
298
|
+
file_path = Path(str(file))
|
299
|
+
|
300
|
+
if not file_path.exists():
|
301
|
+
print("\n\nAn environment file was provided but it doesn't exist.")
|
302
|
+
print(f"\tFile provided: {self.environment_file}")
|
303
|
+
exit()
|
304
|
+
else:
|
305
|
+
self.environment_file = str(file_path)
|
306
|
+
|
307
|
+
load_dotenv(dotenv_path=self.environment_file, override=True)
|
308
|
+
|
309
|
+
|
310
|
+
def main():
|
311
|
+
args = CommandlineArgs()
|
312
|
+
|
313
|
+
if args.is_valid():
|
314
|
+
pwd = "************" if args.password else "empty"
|
315
|
+
print(f"username = {args.username}")
|
316
|
+
print(f"password = {pwd}")
|
317
|
+
print(f"aws_region = {args.aws_region}")
|
318
|
+
print(f"api_domain = {args.api_domain}")
|
319
|
+
print(f"cognito_client_id = {args.cognito_client_id}")
|
320
|
+
print(f"config_file = {args.config_file}")
|
321
|
+
print(f"metadata_file = {args.metadata_file}")
|
322
|
+
print(f"analysis_file = {args.analysis_file}")
|
323
|
+
print(f"output_directory = {args.output_directory}")
|
324
|
+
|
325
|
+
print("were good to go")
|
326
|
+
|
327
|
+
else:
|
328
|
+
print("Missing some required fields.")
|
329
|
+
|
330
|
+
|
331
|
+
if __name__ == "__main__":
|
332
|
+
main()
|
@@ -0,0 +1,81 @@
|
|
1
|
+
"""
|
2
|
+
Aplos Analytics
|
3
|
+
|
4
|
+
"""
|
5
|
+
|
6
|
+
import os
|
7
|
+
import json
|
8
|
+
from typing import Dict, List, Any
|
9
|
+
from pathlib import Path
|
10
|
+
from dotenv import load_dotenv
|
11
|
+
|
12
|
+
|
13
|
+
class EnvironmentServices:
|
14
|
+
"""Environment Services"""
|
15
|
+
|
16
|
+
def load_environment(
|
17
|
+
self,
|
18
|
+
*,
|
19
|
+
starting_path: str | None = None,
|
20
|
+
file_name: str = ".env.dev",
|
21
|
+
override_vars: bool = True,
|
22
|
+
raise_error_if_not_found: bool = True,
|
23
|
+
):
|
24
|
+
"""Loads the local environment"""
|
25
|
+
|
26
|
+
if not starting_path:
|
27
|
+
starting_path = __file__
|
28
|
+
|
29
|
+
environment_file: str | None = self.find_file(
|
30
|
+
starting_path=starting_path,
|
31
|
+
file_name=file_name,
|
32
|
+
raise_error_if_not_found=raise_error_if_not_found,
|
33
|
+
)
|
34
|
+
|
35
|
+
if environment_file:
|
36
|
+
load_dotenv(dotenv_path=environment_file, override=override_vars)
|
37
|
+
|
38
|
+
def load_event_file(self, full_path: str) -> Dict[str, Any]:
|
39
|
+
"""Loads an event file"""
|
40
|
+
if not os.path.exists(full_path):
|
41
|
+
raise RuntimeError(f"Failed to locate event file: {full_path}")
|
42
|
+
|
43
|
+
event: Dict = {}
|
44
|
+
with open(full_path, mode="r", encoding="utf-8") as json_file:
|
45
|
+
event = json.load(json_file)
|
46
|
+
|
47
|
+
if "message" in event:
|
48
|
+
tmp = event.get("message")
|
49
|
+
if isinstance(tmp, Dict):
|
50
|
+
event = tmp
|
51
|
+
|
52
|
+
if "event" in event:
|
53
|
+
tmp = event.get("event")
|
54
|
+
if isinstance(tmp, Dict):
|
55
|
+
event = tmp
|
56
|
+
|
57
|
+
return event
|
58
|
+
|
59
|
+
def find_file(
|
60
|
+
self, starting_path: str, file_name: str, raise_error_if_not_found: bool = True
|
61
|
+
) -> str | None:
|
62
|
+
"""Searches the project directory structor for a file"""
|
63
|
+
parents = 10
|
64
|
+
starting_path = starting_path or __file__
|
65
|
+
|
66
|
+
paths: List[str] = []
|
67
|
+
for parent in range(parents):
|
68
|
+
path = Path(starting_path).parents[parent].absolute()
|
69
|
+
|
70
|
+
tmp = os.path.join(path, file_name)
|
71
|
+
paths.append(tmp)
|
72
|
+
if os.path.exists(tmp):
|
73
|
+
return tmp
|
74
|
+
|
75
|
+
if raise_error_if_not_found:
|
76
|
+
searched_paths = "\n".join(paths)
|
77
|
+
raise RuntimeError(
|
78
|
+
f"Failed to locate environment file: {file_name} in: \n {searched_paths}"
|
79
|
+
)
|
80
|
+
|
81
|
+
return None
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import os
|
2
|
+
|
3
|
+
|
4
|
+
class EnvironmentVars:
|
5
|
+
"""Loading Environment Vars or replace them with runtime values"""
|
6
|
+
|
7
|
+
def __init__(self) -> None:
|
8
|
+
# load defaults
|
9
|
+
self.api_domain = os.getenv("APLOS_API_DOMAIN")
|
10
|
+
|
11
|
+
self.aws_region = os.getenv("COGNITO_REGION")
|
12
|
+
self.client_id = os.getenv("COGNITO_CLIENT_ID")
|
13
|
+
self.username = os.getenv("COGNITO_USER_NAME")
|
14
|
+
self.password = os.getenv("COGNITO_PASSWORD")
|
15
|
+
|
16
|
+
self.config_file = os.getenv("CONFIG_FILE")
|
17
|
+
self.metadata_file = os.getenv("METADATA_FILE")
|
18
|
+
self.analysis_file = os.getenv("ANALYSIS_FILE")
|
19
|
+
|
20
|
+
if "https://" in self.api_domain:
|
21
|
+
self.api_domain = self.api_domain.replace("https://", "")
|
22
|
+
|
23
|
+
self.aplos_api_url = f"https://{self.api_domain}"
|
@@ -0,0 +1,30 @@
|
|
1
|
+
class Routes:
|
2
|
+
"""NCA Saas Routes"""
|
3
|
+
|
4
|
+
NCA_EXECUTIONS = "nca/executions"
|
5
|
+
NCA_GENERATE_UPLOAD = "nca/files"
|
6
|
+
|
7
|
+
|
8
|
+
class HttpUtilities:
|
9
|
+
"""Http Utilties"""
|
10
|
+
|
11
|
+
@staticmethod
|
12
|
+
def build_url(domain_name: str) -> str:
|
13
|
+
"""Build the url"""
|
14
|
+
domain_name = domain_name.strip()
|
15
|
+
if domain_name.startswith("http"):
|
16
|
+
return domain_name
|
17
|
+
else:
|
18
|
+
return f"https://{domain_name}"
|
19
|
+
|
20
|
+
@staticmethod
|
21
|
+
def get_headers(jwt: str) -> dict:
|
22
|
+
"""Get the Http Headers"""
|
23
|
+
headers = {
|
24
|
+
"Content-Type": "application/json",
|
25
|
+
}
|
26
|
+
|
27
|
+
if jwt:
|
28
|
+
headers["Authorization"] = f"Bearer {jwt}"
|
29
|
+
|
30
|
+
return headers
|
@@ -0,0 +1,49 @@
|
|
1
|
+
Metadata-Version: 2.3
|
2
|
+
Name: aplos_nca_saas_sdk
|
3
|
+
Version: 0.0.1
|
4
|
+
Summary: Aplos NCA SaaS SDK
|
5
|
+
Author-email: Eric Wilson <eric.wilson@aplosanalytics.com>
|
6
|
+
Classifier: License :: OSI Approved :: MIT License
|
7
|
+
Classifier: Operating System :: OS Independent
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
9
|
+
Requires-Python: >=3.10
|
10
|
+
Requires-Dist: aws-lambda-powertools==2.38.1
|
11
|
+
Requires-Dist: boto3==1.34.110
|
12
|
+
Requires-Dist: pyjwt==2.9.0
|
13
|
+
Requires-Dist: python-dotenv==1.0.1
|
14
|
+
Requires-Dist: requests==2.31.0
|
15
|
+
Description-Content-Type: text/markdown
|
16
|
+
|
17
|
+
# Aplos NCA SaaS SDK for python
|
18
|
+
|
19
|
+
You can use 🐍 python to perform analysis with Aplos NCA using API calls via secure HTTPS requests.
|
20
|
+
|
21
|
+
> 👉 We use this for our demos 🚀🚀 👈
|
22
|
+
> We'll keep this maintained as we use it for our customer demos. So keep coming back for new features.
|
23
|
+
|
24
|
+
|
25
|
+
## API Settings
|
26
|
+
|
27
|
+
> 🛑 A valid Aplos NCA Account is required. 🛑
|
28
|
+
> In order to run the executions and connect to our system, you will need a valid account with an active subscription.
|
29
|
+
>
|
30
|
+
> You'll need your username (email address and a password) a Cognito Client Id
|
31
|
+
> which allows the USER_PASSWORD_AUTH flow, and your API URL.
|
32
|
+
>
|
33
|
+
> The Client Id (aka Cognito Client Key) and API URL can be found in your user account.
|
34
|
+
> Your username is your email address and your password would have been provided to you during your
|
35
|
+
> onboarding or with a "forgot password" request and reset.
|
36
|
+
|
37
|
+
|
38
|
+
## API
|
39
|
+
You can use the API to integrate the Aplos NCA SaaS Cloud Solution into your workflow.
|
40
|
+
|
41
|
+
## API Integration Testing
|
42
|
+
You can use the integration testing to test your environment. You can also use the Integration Testing modules
|
43
|
+
to learn how to use the API.
|
44
|
+
|
45
|
+
## Source
|
46
|
+
Full source code can also be found on [GitHub](https://github.com/AplosAnalytics/Aplos-NCA-SaaS-SDK)
|
47
|
+
|
48
|
+
|
49
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
aplos_nca_saas_sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
aplos_nca_saas_sdk/version.py,sha256=AyrxKx5VepK28krzpEkS3Jq6fsmJCTrEggFNTuNB0xk,171
|
3
|
+
aplos_nca_saas_sdk/aws_resources/aws_cognito.py,sha256=jJQnHrIIKTry0Bk1vWem6WEKvxo-4BUI3O81WRWti_4,6306
|
4
|
+
aplos_nca_saas_sdk/aws_resources/aws_s3_presigned_payload.py,sha256=rbTaeUgPpRsw1KV0YjnmkD5sQvlYet9XBj6Ie7nXz5Y,1987
|
5
|
+
aplos_nca_saas_sdk/aws_resources/aws_s3_presigned_upload.py,sha256=WK7CKzuHcgU15k2BWiBqSZ8UdQSVSo39L8Las-7gvC0,3940
|
6
|
+
aplos_nca_saas_sdk/files/analysis_files/single_ev/configuration_single_ev.json,sha256=lLnRV0jwzaSn32D8NlOekOF5oGFfUwugUlvlwoKz540,986
|
7
|
+
aplos_nca_saas_sdk/files/analysis_files/single_ev/meta_data.json,sha256=p1KYOAe5Cl3rjtfF1t96oRG-QtFJJCo9otReRPNtvIk,447
|
8
|
+
aplos_nca_saas_sdk/files/analysis_files/single_ev/single_ev.csv,sha256=qFSAlgLOmERsabMmp1X6PAZa-8yFthZlHacM_f7_AOY,6528
|
9
|
+
aplos_nca_saas_sdk/integration_testing/integration_test_base.py,sha256=wp0uneVMnksj0hkSvks06CqyTB6YCDQs6qfVAWFIvnM,1037
|
10
|
+
aplos_nca_saas_sdk/integration_testing/integration_test_factory.py,sha256=9wQzdtBLMrBb4dfYkNE7-miyayPNhTHOWgqEMSL9-Yc,2081
|
11
|
+
aplos_nca_saas_sdk/integration_testing/integration_test_suite.py,sha256=QHoJzAp9Qm4XTOeYE8waNqZmMh2S5XO2AYq0RfGwj4s,3020
|
12
|
+
aplos_nca_saas_sdk/integration_testing/main.py,sha256=y2OqzPRccGb45d_MoAIRjxRblFHgHxZ8PH-e52R5blw,736
|
13
|
+
aplos_nca_saas_sdk/integration_testing/readme.md,sha256=sX-_gzx17UUF-ZqvCWq0R5zcqgOMC4JjQKnjgxQH9vM,629
|
14
|
+
aplos_nca_saas_sdk/integration_testing/tests/app_configuration_test.py,sha256=Ezz3mZWE3Nv8CIfc-zXnpE0WgbI5QgQvVfHqP8lfb3Y,861
|
15
|
+
aplos_nca_saas_sdk/integration_testing/tests/app_execution_test.py,sha256=bDyVvtOKSJdy0sdCVYVuCdUrQYhn8D3peCmM1OCkSVg,145
|
16
|
+
aplos_nca_saas_sdk/integration_testing/tests/app_login_test.py,sha256=rE5hSDKgLLTkgL6pwtFax8SO1HknAXkLJvmFvb_BHtI,877
|
17
|
+
aplos_nca_saas_sdk/integration_testing/tests/app_validation_test.py,sha256=bDyVvtOKSJdy0sdCVYVuCdUrQYhn8D3peCmM1OCkSVg,145
|
18
|
+
aplos_nca_saas_sdk/nca_resources/nca_app_configuration.py,sha256=mRK_OK2k0q4o4pH11tpeR3yKve7sgw3XTtQ0HG9KKFU,1877
|
19
|
+
aplos_nca_saas_sdk/nca_resources/nca_endpoints.py,sha256=8jQK8mniRFaQaGnpG1g_D0si8HCJciVvcLA6wFtOers,2026
|
20
|
+
aplos_nca_saas_sdk/nca_resources/nca_executions.py,sha256=M-bwZOL9w4FNUfC8m2eMTw4H_P45J1psfffY6KeBwtM,12565
|
21
|
+
aplos_nca_saas_sdk/nca_resources/nca_login.py,sha256=iw8JFITWm9vRyxzRlW4BJMVCQyL3Qeo_nwxKVB3bpUM,3024
|
22
|
+
aplos_nca_saas_sdk/utilities/commandline_args.py,sha256=WKIPNKMMMpEk580xXMQY7sGwxZP-uX6DVqD-8SX3NKM,11721
|
23
|
+
aplos_nca_saas_sdk/utilities/environment_services.py,sha256=K6xnxDb9eNdmjJZKPW0JfmmV9rGGwm2urlxCBZwxMMs,2272
|
24
|
+
aplos_nca_saas_sdk/utilities/environment_vars.py,sha256=abzjw2egdRJxrUP6sHDwCV4R56R4LzfsVI69QyHYvhU,776
|
25
|
+
aplos_nca_saas_sdk/utilities/http_utility.py,sha256=7VGWeSOuJbjnUQkzNA6cquKv0g2FJoHsBnDSgE2Buic,696
|
26
|
+
aplos_nca_saas_sdk-0.0.1.dist-info/METADATA,sha256=xh3oHwBctj7wN9n0_V67M_mzBjN1-YTnEAK8YYbkf_k,1784
|
27
|
+
aplos_nca_saas_sdk-0.0.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
28
|
+
aplos_nca_saas_sdk-0.0.1.dist-info/licenses/LICENSE,sha256=pAZXnNE2dxxwXFIduGyn1gpvPefJtUYOYZOi3yeGG94,1068
|
29
|
+
aplos_nca_saas_sdk-0.0.1.dist-info/RECORD,,
|
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) [year] [fullname]
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|