dataall-cli 0.3.0a1__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.
- dataall_cli/__init__.py +38 -0
- dataall_cli/__main__.py +18 -0
- dataall_cli/__metadata__.py +11 -0
- dataall_cli/bind_commands.py +106 -0
- dataall_cli/cli.py +148 -0
- dataall_cli/utils/__init__.py +5 -0
- dataall_cli/utils/config.py +69 -0
- dataall_cli-0.3.0a1.dist-info/LICENSE +175 -0
- dataall_cli-0.3.0a1.dist-info/METADATA +68 -0
- dataall_cli-0.3.0a1.dist-info/NOTICE +1 -0
- dataall_cli-0.3.0a1.dist-info/NOTICE.txt +2 -0
- dataall_cli-0.3.0a1.dist-info/RECORD +14 -0
- dataall_cli-0.3.0a1.dist-info/WHEEL +4 -0
- dataall_cli-0.3.0a1.dist-info/entry_points.txt +3 -0
dataall_cli/__init__.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# © 2023 Amazon Web Services, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
# This AWS Content is provided subject to the terms of the AWS Customer Agreement
|
|
3
|
+
# available at http://aws.amazon.com/agreement or other written agreement between
|
|
4
|
+
# Customer and either Amazon Web Services, Inc. or Amazon Web Services EMEA SARL or both.
|
|
5
|
+
|
|
6
|
+
"""Initial Module Data.all CLI.
|
|
7
|
+
|
|
8
|
+
Source repository: TODO
|
|
9
|
+
Documentation: TODO
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import logging
|
|
14
|
+
import os
|
|
15
|
+
import sys
|
|
16
|
+
|
|
17
|
+
from dataall_core.profile import CONFIG_PATH
|
|
18
|
+
|
|
19
|
+
from .__metadata__ import ( # noqa: F401
|
|
20
|
+
__description__,
|
|
21
|
+
__license__,
|
|
22
|
+
__title__,
|
|
23
|
+
__version__,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
root_logger = logging.getLogger("dataall_cli")
|
|
27
|
+
root_logger.setLevel(os.environ.get("dataall_cli_loglevel", "INFO").upper())
|
|
28
|
+
|
|
29
|
+
handler = logging.StreamHandler(sys.stdout)
|
|
30
|
+
handler.setFormatter(
|
|
31
|
+
logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
|
32
|
+
)
|
|
33
|
+
root_logger.addHandler(handler)
|
|
34
|
+
|
|
35
|
+
DA_CONFIG_PATH = os.getenv("dataall_config_path", CONFIG_PATH)
|
|
36
|
+
CREDS_PATH = os.getenv("dataall_creds_path", None)
|
|
37
|
+
SCHEMA_PATH = os.getenv("dataall_schema_path", None)
|
|
38
|
+
SCHEMA_VERSION = os.getenv("dataall_schema_version", None)
|
dataall_cli/__main__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# © 2023 Amazon Web Services, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
# This AWS Content is provided subject to the terms of the AWS Customer Agreement
|
|
3
|
+
# available at http://aws.amazon.com/agreement or other written agreement between
|
|
4
|
+
# Customer and either Amazon Web Services, Inc. or Amazon Web Services EMEA SARL or both.
|
|
5
|
+
|
|
6
|
+
"""Main Module Data.all CLI.
|
|
7
|
+
|
|
8
|
+
Source repository: TODO
|
|
9
|
+
Documentation: TODO
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import sys
|
|
14
|
+
|
|
15
|
+
from cli import dataall_cli
|
|
16
|
+
|
|
17
|
+
if __name__ == "__main__":
|
|
18
|
+
sys.exit(dataall_cli())
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"""Functions to Bind Dataall Commands to core functions."""
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import logging
|
|
5
|
+
from typing import Any, Callable, Dict, Optional
|
|
6
|
+
|
|
7
|
+
import click
|
|
8
|
+
from dataall_core.dataall_client import DataallClient
|
|
9
|
+
|
|
10
|
+
logger = logging.getLogger(__name__)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _structure_input_dict(
|
|
14
|
+
flattened: dict[str, Any], cli_args: dict[str, Any], sep: str = "."
|
|
15
|
+
) -> dict[str, Any]:
|
|
16
|
+
reconstructed: dict[str, Any] = {}
|
|
17
|
+
for key, parent in flattened.items():
|
|
18
|
+
if key.lower() in cli_args.keys():
|
|
19
|
+
if parent[1] and cli_args[key.lower()]:
|
|
20
|
+
# Try JSON Loads for Dict Input
|
|
21
|
+
try:
|
|
22
|
+
cli_args[key.lower()] = json.loads(cli_args[key.lower()])
|
|
23
|
+
except json.JSONDecodeError:
|
|
24
|
+
pass
|
|
25
|
+
parent_keys = parent[1].split(sep)
|
|
26
|
+
parent_dict = reconstructed
|
|
27
|
+
for pk in parent_keys[:-1]:
|
|
28
|
+
parent_dict = parent_dict.setdefault(pk, {})
|
|
29
|
+
parent_dict[parent_keys[-1]] = cli_args[key.lower()]
|
|
30
|
+
|
|
31
|
+
return reconstructed
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _bind_function(
|
|
35
|
+
fn_name: str,
|
|
36
|
+
operation_details: dict[str, Any],
|
|
37
|
+
config_path: str,
|
|
38
|
+
schema_path: Optional[str],
|
|
39
|
+
schema_version: Optional[str],
|
|
40
|
+
custom_headers: Dict[str, Any] = {},
|
|
41
|
+
) -> Callable[..., None]:
|
|
42
|
+
name = operation_details["operation_name"]
|
|
43
|
+
operation_details["input_args"]
|
|
44
|
+
flatten_input_args = operation_details["flatten_input_args"]
|
|
45
|
+
|
|
46
|
+
def func(**kwargs: Any) -> None:
|
|
47
|
+
logger.debug("I am the '{}' command".format(name))
|
|
48
|
+
da_client = DataallClient(
|
|
49
|
+
schema_path=schema_path, schema_version=schema_version
|
|
50
|
+
).client(
|
|
51
|
+
profile=kwargs.get("profile", "default"),
|
|
52
|
+
config_path=config_path,
|
|
53
|
+
custom_headers=custom_headers,
|
|
54
|
+
)
|
|
55
|
+
input_dict = {}
|
|
56
|
+
try:
|
|
57
|
+
input_dict = _structure_input_dict(flatten_input_args, kwargs)
|
|
58
|
+
except Exception as e:
|
|
59
|
+
raise Exception(f"Invalid Input: {e}")
|
|
60
|
+
response = getattr(da_client, fn_name)(**input_dict)
|
|
61
|
+
click.echo(json.dumps(response))
|
|
62
|
+
|
|
63
|
+
# Add Click Options
|
|
64
|
+
for key in flatten_input_args.keys():
|
|
65
|
+
desc = flatten_input_args[key][0]
|
|
66
|
+
func = click.option(f"--{key}", default=None, help=desc)(func)
|
|
67
|
+
func = click.option("--profile", default="default", help="data.all profile name")(
|
|
68
|
+
func
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# Add Click Func Name
|
|
72
|
+
func.__name__ = fn_name
|
|
73
|
+
return func
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
# IMPORTANT: Bind each CLI command name to its respective function
|
|
77
|
+
def bind(
|
|
78
|
+
dataall_cli: click.Group,
|
|
79
|
+
commands: Dict[str, Any],
|
|
80
|
+
config_path: str,
|
|
81
|
+
schema_path: Optional[str],
|
|
82
|
+
schema_version: Optional[str],
|
|
83
|
+
custom_headers: Dict[str, Any] = {},
|
|
84
|
+
) -> None:
|
|
85
|
+
"""
|
|
86
|
+
Bind CLI commands to their respective functions.
|
|
87
|
+
|
|
88
|
+
Args:
|
|
89
|
+
dataall_cli (click.Group): The main CLI group.
|
|
90
|
+
commands (Dict[str, Any]): A dictionary containing the command details.
|
|
91
|
+
config_path (str): The path to the configuration file.
|
|
92
|
+
|
|
93
|
+
Returns
|
|
94
|
+
-------
|
|
95
|
+
None
|
|
96
|
+
"""
|
|
97
|
+
for operation_name, operation_details in commands.items():
|
|
98
|
+
f = _bind_function(
|
|
99
|
+
operation_name,
|
|
100
|
+
operation_details,
|
|
101
|
+
config_path,
|
|
102
|
+
schema_path,
|
|
103
|
+
schema_version,
|
|
104
|
+
custom_headers,
|
|
105
|
+
)
|
|
106
|
+
dataall_cli.command(name=operation_name)(f)
|
dataall_cli/cli.py
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"""CLI for data.all."""
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import logging
|
|
5
|
+
import os
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
import click
|
|
9
|
+
from dataall_core.dataall_client import DataallClient
|
|
10
|
+
from dataall_core.profile import CONFIG_PATH
|
|
11
|
+
|
|
12
|
+
from .bind_commands import bind
|
|
13
|
+
from .utils import save_config
|
|
14
|
+
|
|
15
|
+
DA_CONFIG_PATH = os.getenv("dataall_config_path", CONFIG_PATH)
|
|
16
|
+
CREDS_PATH = os.getenv("dataall_creds_path", None)
|
|
17
|
+
SCHEMA_PATH = os.getenv("dataall_schema_path", None)
|
|
18
|
+
SCHEMA_VERSION = os.getenv("dataall_schema_version", None)
|
|
19
|
+
DA_CUSTOM_HEADERS_JSON: str = os.getenv("dataall_custom_headers_json", "{}")
|
|
20
|
+
|
|
21
|
+
logger = logging.getLogger(__name__)
|
|
22
|
+
|
|
23
|
+
try:
|
|
24
|
+
custom_headers = json.loads(DA_CUSTOM_HEADERS_JSON)
|
|
25
|
+
except ValueError:
|
|
26
|
+
logger.info(
|
|
27
|
+
f"Invalid custom headers json string: {DA_CUSTOM_HEADERS_JSON}. Using default headers..."
|
|
28
|
+
)
|
|
29
|
+
custom_headers = {}
|
|
30
|
+
|
|
31
|
+
da = DataallClient(schema_path=SCHEMA_PATH, schema_version=SCHEMA_VERSION)
|
|
32
|
+
default_client = da.client(config_path=DA_CONFIG_PATH, custom_headers=custom_headers)
|
|
33
|
+
commands = da.op_dict
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@click.group(name="dataall_cli", invoke_without_command=True)
|
|
37
|
+
def dataall_cli() -> None:
|
|
38
|
+
"""data.all cli groups."""
|
|
39
|
+
click.echo("Executing dataall_cli.")
|
|
40
|
+
pass
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
bind(
|
|
44
|
+
dataall_cli=dataall_cli,
|
|
45
|
+
commands=commands,
|
|
46
|
+
config_path=DA_CONFIG_PATH,
|
|
47
|
+
schema_path=SCHEMA_PATH,
|
|
48
|
+
schema_version=SCHEMA_VERSION,
|
|
49
|
+
custom_headers=custom_headers,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@dataall_cli.command()
|
|
54
|
+
@click.option(
|
|
55
|
+
"--auth_type",
|
|
56
|
+
type=click.Choice(["CognitoAuth", "CustomAuth"]),
|
|
57
|
+
default="CognitoAuth",
|
|
58
|
+
prompt="Select authentication type",
|
|
59
|
+
help="Authentication type: Cognito or Custom",
|
|
60
|
+
)
|
|
61
|
+
@click.option(
|
|
62
|
+
"--client_id",
|
|
63
|
+
required=True,
|
|
64
|
+
prompt="Enter data.all app client id",
|
|
65
|
+
help="data.all app client id",
|
|
66
|
+
)
|
|
67
|
+
@click.option(
|
|
68
|
+
"--api_endpoint_url",
|
|
69
|
+
required=True,
|
|
70
|
+
prompt="Enter data.all API endpoint url",
|
|
71
|
+
help="data.all API endpoint url",
|
|
72
|
+
)
|
|
73
|
+
@click.option(
|
|
74
|
+
"--redirect_uri",
|
|
75
|
+
required=True,
|
|
76
|
+
prompt="Enter data.all's domain URL (e.g. https://<DOMAIN>.com)",
|
|
77
|
+
help="data.all domain URL",
|
|
78
|
+
)
|
|
79
|
+
@click.option(
|
|
80
|
+
"--idp_domain_url",
|
|
81
|
+
required=True,
|
|
82
|
+
prompt="Enter data.all Identity Provider Domain (e.g. https://<IdP-DOMAIN>.com)",
|
|
83
|
+
help="data.all IdP domain URL",
|
|
84
|
+
)
|
|
85
|
+
@click.option(
|
|
86
|
+
"--client_secret",
|
|
87
|
+
required=False,
|
|
88
|
+
prompt="Enter IdP client secret (if applicable)",
|
|
89
|
+
default="",
|
|
90
|
+
help="profile name for dataall_cli configured user",
|
|
91
|
+
)
|
|
92
|
+
@click.option(
|
|
93
|
+
"--auth_server",
|
|
94
|
+
prompt="Enter IdP custom auth server (if applicable)",
|
|
95
|
+
default="default",
|
|
96
|
+
help="identity provider's custom authorization server used to get well-known openid config",
|
|
97
|
+
)
|
|
98
|
+
@click.option(
|
|
99
|
+
"--profile",
|
|
100
|
+
prompt="Enter data.all profile name",
|
|
101
|
+
default="default",
|
|
102
|
+
help="profile name for dataall_cli configured user",
|
|
103
|
+
)
|
|
104
|
+
def configure(
|
|
105
|
+
client_id: str,
|
|
106
|
+
api_endpoint_url: str,
|
|
107
|
+
auth_type: str,
|
|
108
|
+
redirect_uri: str,
|
|
109
|
+
idp_domain_url: str,
|
|
110
|
+
client_secret: str,
|
|
111
|
+
auth_server: str,
|
|
112
|
+
profile: str,
|
|
113
|
+
) -> None:
|
|
114
|
+
"""Configure data.all client for a given user, use profile to setup multiple user profiles."""
|
|
115
|
+
click.echo("Configuring data.all CLI...")
|
|
116
|
+
|
|
117
|
+
try:
|
|
118
|
+
profile_params_dict = {
|
|
119
|
+
"client_id": client_id,
|
|
120
|
+
"api_endpoint_url": api_endpoint_url,
|
|
121
|
+
"auth_type": auth_type,
|
|
122
|
+
"idp_domain_url": idp_domain_url,
|
|
123
|
+
"redirect_uri": redirect_uri,
|
|
124
|
+
"client_secret": client_secret,
|
|
125
|
+
}
|
|
126
|
+
if auth_type == "CustomAuth":
|
|
127
|
+
session_token_endpoint = click.prompt("Enter session token endpoint")
|
|
128
|
+
profile_params_dict.update(
|
|
129
|
+
{
|
|
130
|
+
"auth_server": auth_server,
|
|
131
|
+
"session_token_endpoint": session_token_endpoint,
|
|
132
|
+
}
|
|
133
|
+
)
|
|
134
|
+
if CREDS_PATH:
|
|
135
|
+
profile_params_dict.update(
|
|
136
|
+
{
|
|
137
|
+
"creds_path": str(CREDS_PATH),
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
save_config(
|
|
141
|
+
profile=profile,
|
|
142
|
+
auth_type=auth_type,
|
|
143
|
+
params_dict=profile_params_dict,
|
|
144
|
+
config_path=Path(DA_CONFIG_PATH),
|
|
145
|
+
)
|
|
146
|
+
click.echo("data.all CLI configured successfully.")
|
|
147
|
+
except Exception as e:
|
|
148
|
+
click.echo(f"An error occurred: {e}")
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""data.all cli config helper functions.
|
|
2
|
+
|
|
3
|
+
Source repository: TODO
|
|
4
|
+
Documentation: TODO
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import logging
|
|
9
|
+
import os
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
from typing import Any, Dict, cast
|
|
12
|
+
|
|
13
|
+
import yaml
|
|
14
|
+
from dataall_core.auth import AuthorizationClass
|
|
15
|
+
from dataall_core.profile import Profile, save_profile
|
|
16
|
+
|
|
17
|
+
logger = logging.getLogger(__name__)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def load_config(config_path: str) -> dict[Any, Any]:
|
|
21
|
+
"""Retrieve data.all config use ENV variable [dataall_config_path] to override default file location.
|
|
22
|
+
|
|
23
|
+
:return: retrieved config from the file.
|
|
24
|
+
"""
|
|
25
|
+
logger.info(f"Get config from {config_path}")
|
|
26
|
+
if os.path.isfile(config_path):
|
|
27
|
+
with open(config_path) as file:
|
|
28
|
+
config = yaml.full_load(file)
|
|
29
|
+
logger.debug(f"Retrieved config: {config}")
|
|
30
|
+
return cast(dict[Any, Any], config)
|
|
31
|
+
else:
|
|
32
|
+
return {}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def save_config(
|
|
36
|
+
profile: str,
|
|
37
|
+
auth_type: str,
|
|
38
|
+
params_dict: Dict[str, Any],
|
|
39
|
+
config_path: Path,
|
|
40
|
+
) -> None:
|
|
41
|
+
"""Save Config Functions.
|
|
42
|
+
|
|
43
|
+
:param profile: profile to save
|
|
44
|
+
:param auth_type: auth type for the user
|
|
45
|
+
:param params_dict: dict of profile params for the user
|
|
46
|
+
:param config_path: path to config to store params
|
|
47
|
+
"""
|
|
48
|
+
config = {f"{profile}": params_dict}
|
|
49
|
+
|
|
50
|
+
# Init Profile
|
|
51
|
+
p = Profile(profile_name=profile, **config[profile])
|
|
52
|
+
|
|
53
|
+
# Save Profile
|
|
54
|
+
save_profile(p, config_path)
|
|
55
|
+
|
|
56
|
+
# Get Tokens
|
|
57
|
+
auth_class = next(
|
|
58
|
+
(
|
|
59
|
+
cls
|
|
60
|
+
for cls in AuthorizationClass.__subclasses__()
|
|
61
|
+
if cls.__name__ == auth_type
|
|
62
|
+
),
|
|
63
|
+
None,
|
|
64
|
+
)
|
|
65
|
+
if auth_class:
|
|
66
|
+
auth_instance = auth_class(p)
|
|
67
|
+
auth_instance.get_jwt_token()
|
|
68
|
+
else:
|
|
69
|
+
logger.error(f"No AuthorizationClass subclass found with name '{auth_type}'")
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: dataall-cli
|
|
3
|
+
Version: 0.3.0a1
|
|
4
|
+
Summary: AWS data.all CLI
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Keywords: dataall,aws
|
|
7
|
+
Author: Amazon Web Services
|
|
8
|
+
Requires-Python: >=3.9,<4.0
|
|
9
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Requires-Dist: PyYAML (>=6.0.1,<7.0.0)
|
|
17
|
+
Requires-Dist: atomicfile (>=1.0.1,<2.0.0)
|
|
18
|
+
Requires-Dist: boto3 (>=1.28.22,<2.0.0)
|
|
19
|
+
Requires-Dist: botocore (>=1.31.22,<2.0.0)
|
|
20
|
+
Requires-Dist: click (>=8.1.6,<9.0.0)
|
|
21
|
+
Requires-Dist: dataall-core (>=0.3.0a1,<0.4.0)
|
|
22
|
+
Requires-Dist: packaging (>=21.1,<24.0)
|
|
23
|
+
Requires-Dist: pytest-mock (>=3.14.0,<4.0.0)
|
|
24
|
+
Requires-Dist: setuptools ; python_version >= "3.12"
|
|
25
|
+
Requires-Dist: typing-extensions (>=4.4.0,<5.0.0)
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# AWS data.all SDK (dataall-sdk)
|
|
29
|
+
|
|
30
|
+
> An [AWS Professional Service](https://aws.amazon.com/professional-services/) open source initiative | aws-proserve-opensource@amazon.com
|
|
31
|
+
|
|
32
|
+
[](https://github.com/psf/black)
|
|
33
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
34
|
+
|
|
35
|
+
[](http://mypy-lang.org/)
|
|
36
|
+
![Static Checking]()
|
|
37
|
+
[![Documentation Status]()
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## Table of contents
|
|
41
|
+
|
|
42
|
+
- [Quick Start](#quick-start)
|
|
43
|
+
- [Read The Docs](#read-the-docs)
|
|
44
|
+
- [Getting Help](#getting-help)
|
|
45
|
+
|
|
46
|
+
## Quick Start
|
|
47
|
+
|
|
48
|
+
Installation command: `pip install dataall_cli`
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
dataall_cli list_organizations
|
|
52
|
+
|
|
53
|
+
dataall_cli list_organizations --help
|
|
54
|
+
|
|
55
|
+
dataall_cli list_organizations --profile TestProfile
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## [Read The Docs](https://aws-sdk-pandas.readthedocs.io/)
|
|
59
|
+
|
|
60
|
+
- [**Tutorials**](./tutorials/)
|
|
61
|
+
- Coming Soon
|
|
62
|
+
- [**CLI Reference**](./docs/build/html/cli.html)
|
|
63
|
+
- Coming Soon
|
|
64
|
+
- [**License**](../LICENSE)
|
|
65
|
+
- [**Contributing**](../CONTRIBUTING.md)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
dataall_cli/__init__.py,sha256=9iQKRT-Yt38R86wvR046GD850bJ89J5pZAuPU4P1YEU,1142
|
|
2
|
+
dataall_cli/__main__.py,sha256=tN49XBDp_Isep9f5mWbKHbzKGbiuPHTF2VEnt_uxIpE,507
|
|
3
|
+
dataall_cli/__metadata__.py,sha256=peyU5uHxFRGNKqX8tXII5fP2iy493E6nuh1qq6NDjvU,212
|
|
4
|
+
dataall_cli/bind_commands.py,sha256=cJ0izyYYTel4kc7PAZsYPLMwfC1tMg6eCBzLpzOdK-M,3368
|
|
5
|
+
dataall_cli/cli.py,sha256=d3L73nNW8VHGheSjZyw3SCh43yEcJAhuvZ0GIec1ppA,4261
|
|
6
|
+
dataall_cli/utils/__init__.py,sha256=mPWX0FfNF7VQ__dIuwJfxMcOOkf6owacvFkLRiemWb4,114
|
|
7
|
+
dataall_cli/utils/config.py,sha256=8LEBLgHwtGWNbSlFYGKNIR5YBgiqpaV-tlj80pvsR94,1766
|
|
8
|
+
dataall_cli-0.3.0a1.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
9
|
+
dataall_cli-0.3.0a1.dist-info/METADATA,sha256=2CFKvzbq2_82eWTOkhhj-XBjEUa-SmdobWDlV9kKRqs,2147
|
|
10
|
+
dataall_cli-0.3.0a1.dist-info/NOTICE,sha256=1CkO1kwu3Q_OHYTj-d-yiBJA_lNN73a4zSntavaD4oc,67
|
|
11
|
+
dataall_cli-0.3.0a1.dist-info/NOTICE.txt,sha256=-FgOrPqpwukWZAq_TwYx3Kzk3w0b5j2NbVZPaUqY2cc,90
|
|
12
|
+
dataall_cli-0.3.0a1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
13
|
+
dataall_cli-0.3.0a1.dist-info/entry_points.txt,sha256=n6uPBftfKL6ITYo9ML_R0pl7dfwZ4zgJA7Mhuj16fuA,59
|
|
14
|
+
dataall_cli-0.3.0a1.dist-info/RECORD,,
|