fivetran-cli 0.1.11__tar.gz → 0.1.13__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.
- {fivetran_cli-0.1.11/src/fivetran_cli.egg-info → fivetran_cli-0.1.13}/PKG-INFO +19 -14
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/README.md +18 -13
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/pyproject.toml +1 -1
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/src/fivetran_cli/cli.py +12 -3
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13/src/fivetran_cli.egg-info}/PKG-INFO +19 -14
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/tests/test_cli.py +10 -2
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/LICENSE +0 -0
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/MANIFEST.in +0 -0
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/setup.cfg +0 -0
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/src/fivetran_cli/__init__.py +0 -0
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/src/fivetran_cli/__main__.py +0 -0
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/src/fivetran_cli/client.py +0 -0
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/src/fivetran_cli/output.py +0 -0
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/src/fivetran_cli/views.py +0 -0
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/src/fivetran_cli.egg-info/SOURCES.txt +0 -0
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/src/fivetran_cli.egg-info/dependency_links.txt +0 -0
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/src/fivetran_cli.egg-info/requires.txt +0 -0
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/src/fivetran_cli.egg-info/top_level.txt +0 -0
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/tests/test_client.py +0 -0
- {fivetran_cli-0.1.11 → fivetran_cli-0.1.13}/tests/test_output.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fivetran-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.13
|
|
4
4
|
Summary: Command line wrapper for the Fivetran REST API and Connector SDK
|
|
5
5
|
Author: Fivetran
|
|
6
6
|
License-Expression: MIT
|
|
@@ -19,8 +19,13 @@ Dynamic: license-file
|
|
|
19
19
|
|
|
20
20
|
Thin command line wrapper around the Fivetran REST API and Connector SDK.
|
|
21
21
|
|
|
22
|
+
> **Beta:** Fivetran REST API commands are exposed under `fivetran beta` while
|
|
23
|
+
> their command names, flags, and output formatting are still stabilizing.
|
|
24
|
+
> Connector SDK commands remain available at their established top-level shape,
|
|
25
|
+
> for example `fivetran deploy`.
|
|
26
|
+
|
|
22
27
|
```text
|
|
23
|
-
fivetran [global-options] <resource> <operation> [arguments] [options]
|
|
28
|
+
fivetran [global-options] beta <resource> <operation> [arguments] [options]
|
|
24
29
|
```
|
|
25
30
|
|
|
26
31
|
## Installation
|
|
@@ -34,14 +39,14 @@ Verify the installed CLI:
|
|
|
34
39
|
```bash
|
|
35
40
|
fivetran --help
|
|
36
41
|
fivetran deploy --help
|
|
37
|
-
fivetran connection list --help
|
|
42
|
+
fivetran beta connection list --help
|
|
38
43
|
```
|
|
39
44
|
|
|
40
45
|
Credentials default to `FIVETRAN_API_KEY`. Set it to the single Base64-encoded API key shown by Fivetran. Or you can also pass it in via `--api-key` option.
|
|
41
46
|
|
|
42
47
|
```bash
|
|
43
|
-
fivetran --api-key "$FIVETRAN_API_KEY" connection list
|
|
44
|
-
fivetran connection create --config-file connection.json
|
|
48
|
+
fivetran --api-key "$FIVETRAN_API_KEY" beta connection list
|
|
49
|
+
fivetran beta connection create --config-file connection.json
|
|
45
50
|
fivetran deploy
|
|
46
51
|
```
|
|
47
52
|
|
|
@@ -50,10 +55,10 @@ fivetran deploy
|
|
|
50
55
|
Global options may be placed before or after the resource command.
|
|
51
56
|
|
|
52
57
|
```bash
|
|
53
|
-
fivetran connection list --api-key "$FIVETRAN_API_KEY"
|
|
54
|
-
fivetran connection-schema get connection_id
|
|
55
|
-
fivetran connector-metadata get google_ads
|
|
56
|
-
fivetran public-connector list
|
|
58
|
+
fivetran beta connection list --api-key "$FIVETRAN_API_KEY"
|
|
59
|
+
fivetran beta connection-schema get connection_id
|
|
60
|
+
fivetran beta connector-metadata get google_ads
|
|
61
|
+
fivetran beta public-connector list
|
|
57
62
|
```
|
|
58
63
|
|
|
59
64
|
Output defaults to readable text: list responses render as aligned, color-coded
|
|
@@ -61,9 +66,9 @@ tables and detail responses as aligned key/value sections. Use `--output json`
|
|
|
61
66
|
for compact JSON for scripting. Flag and config conventions follow the dbt CLI.
|
|
62
67
|
|
|
63
68
|
```bash
|
|
64
|
-
fivetran connection list # default text table
|
|
65
|
-
fivetran connection get connection_id # default text detail
|
|
66
|
-
fivetran connection list --output json # compact JSON
|
|
69
|
+
fivetran beta connection list # default text table
|
|
70
|
+
fivetran beta connection get connection_id # default text detail
|
|
71
|
+
fivetran beta connection list --output json # compact JSON
|
|
67
72
|
```
|
|
68
73
|
|
|
69
74
|
Output options (each with a `FIVETRAN_*` env override where noted):
|
|
@@ -86,8 +91,8 @@ output.
|
|
|
86
91
|
Create and update commands accept configuration as inline JSON or a JSON file:
|
|
87
92
|
|
|
88
93
|
```bash
|
|
89
|
-
fivetran private-link create --config-file private-link.json
|
|
90
|
-
fivetran connection-schema column update connection_id schema table column --config '{"enabled":false}'
|
|
94
|
+
fivetran beta private-link create --config-file private-link.json
|
|
95
|
+
fivetran beta connection-schema column update connection_id schema table column --config '{"enabled":false}'
|
|
91
96
|
```
|
|
92
97
|
|
|
93
98
|
Destructive commands require `--yes` in non-interactive mode.
|
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Thin command line wrapper around the Fivetran REST API and Connector SDK.
|
|
4
4
|
|
|
5
|
+
> **Beta:** Fivetran REST API commands are exposed under `fivetran beta` while
|
|
6
|
+
> their command names, flags, and output formatting are still stabilizing.
|
|
7
|
+
> Connector SDK commands remain available at their established top-level shape,
|
|
8
|
+
> for example `fivetran deploy`.
|
|
9
|
+
|
|
5
10
|
```text
|
|
6
|
-
fivetran [global-options] <resource> <operation> [arguments] [options]
|
|
11
|
+
fivetran [global-options] beta <resource> <operation> [arguments] [options]
|
|
7
12
|
```
|
|
8
13
|
|
|
9
14
|
## Installation
|
|
@@ -17,14 +22,14 @@ Verify the installed CLI:
|
|
|
17
22
|
```bash
|
|
18
23
|
fivetran --help
|
|
19
24
|
fivetran deploy --help
|
|
20
|
-
fivetran connection list --help
|
|
25
|
+
fivetran beta connection list --help
|
|
21
26
|
```
|
|
22
27
|
|
|
23
28
|
Credentials default to `FIVETRAN_API_KEY`. Set it to the single Base64-encoded API key shown by Fivetran. Or you can also pass it in via `--api-key` option.
|
|
24
29
|
|
|
25
30
|
```bash
|
|
26
|
-
fivetran --api-key "$FIVETRAN_API_KEY" connection list
|
|
27
|
-
fivetran connection create --config-file connection.json
|
|
31
|
+
fivetran --api-key "$FIVETRAN_API_KEY" beta connection list
|
|
32
|
+
fivetran beta connection create --config-file connection.json
|
|
28
33
|
fivetran deploy
|
|
29
34
|
```
|
|
30
35
|
|
|
@@ -33,10 +38,10 @@ fivetran deploy
|
|
|
33
38
|
Global options may be placed before or after the resource command.
|
|
34
39
|
|
|
35
40
|
```bash
|
|
36
|
-
fivetran connection list --api-key "$FIVETRAN_API_KEY"
|
|
37
|
-
fivetran connection-schema get connection_id
|
|
38
|
-
fivetran connector-metadata get google_ads
|
|
39
|
-
fivetran public-connector list
|
|
41
|
+
fivetran beta connection list --api-key "$FIVETRAN_API_KEY"
|
|
42
|
+
fivetran beta connection-schema get connection_id
|
|
43
|
+
fivetran beta connector-metadata get google_ads
|
|
44
|
+
fivetran beta public-connector list
|
|
40
45
|
```
|
|
41
46
|
|
|
42
47
|
Output defaults to readable text: list responses render as aligned, color-coded
|
|
@@ -44,9 +49,9 @@ tables and detail responses as aligned key/value sections. Use `--output json`
|
|
|
44
49
|
for compact JSON for scripting. Flag and config conventions follow the dbt CLI.
|
|
45
50
|
|
|
46
51
|
```bash
|
|
47
|
-
fivetran connection list # default text table
|
|
48
|
-
fivetran connection get connection_id # default text detail
|
|
49
|
-
fivetran connection list --output json # compact JSON
|
|
52
|
+
fivetran beta connection list # default text table
|
|
53
|
+
fivetran beta connection get connection_id # default text detail
|
|
54
|
+
fivetran beta connection list --output json # compact JSON
|
|
50
55
|
```
|
|
51
56
|
|
|
52
57
|
Output options (each with a `FIVETRAN_*` env override where noted):
|
|
@@ -69,8 +74,8 @@ output.
|
|
|
69
74
|
Create and update commands accept configuration as inline JSON or a JSON file:
|
|
70
75
|
|
|
71
76
|
```bash
|
|
72
|
-
fivetran private-link create --config-file private-link.json
|
|
73
|
-
fivetran connection-schema column update connection_id schema table column --config '{"enabled":false}'
|
|
77
|
+
fivetran beta private-link create --config-file private-link.json
|
|
78
|
+
fivetran beta connection-schema column update connection_id schema table column --config '{"enabled":false}'
|
|
74
79
|
```
|
|
75
80
|
|
|
76
81
|
Destructive commands require `--yes` in non-interactive mode.
|
|
@@ -16,6 +16,7 @@ from .output import emit_output
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
Handler = Callable[[argparse.Namespace, FivetranClient], Any]
|
|
19
|
+
BETA_COMMAND = "beta"
|
|
19
20
|
REST_RESOURCE_NAMES = {
|
|
20
21
|
"account",
|
|
21
22
|
"certificate",
|
|
@@ -154,7 +155,13 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
154
155
|
)
|
|
155
156
|
_add_global_options(parser)
|
|
156
157
|
|
|
157
|
-
|
|
158
|
+
commands = parser.add_subparsers(dest="command", metavar="<command>")
|
|
159
|
+
beta = commands.add_parser(
|
|
160
|
+
BETA_COMMAND,
|
|
161
|
+
help="Use beta Fivetran REST API commands.",
|
|
162
|
+
description="Use beta Fivetran REST API commands.",
|
|
163
|
+
)
|
|
164
|
+
resources = beta.add_subparsers(dest="resource", metavar="<resource>")
|
|
158
165
|
_add_account(resources)
|
|
159
166
|
_add_certificate(resources)
|
|
160
167
|
_add_connection(resources)
|
|
@@ -176,7 +183,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
176
183
|
_add_transformation(resources)
|
|
177
184
|
_add_transformation_project(resources)
|
|
178
185
|
_add_webhook(resources)
|
|
179
|
-
_add_sdk_commands(
|
|
186
|
+
_add_sdk_commands(commands)
|
|
180
187
|
return parser
|
|
181
188
|
|
|
182
189
|
|
|
@@ -284,7 +291,7 @@ def _add_account(resources: argparse._SubParsersAction[argparse.ArgumentParser])
|
|
|
284
291
|
"Get account information.",
|
|
285
292
|
Endpoint("GET", "/v1/account/info"),
|
|
286
293
|
epilog=(
|
|
287
|
-
"Example: fivetran account get\n\n"
|
|
294
|
+
"Example: fivetran beta account get\n\n"
|
|
288
295
|
"Note: this uses the current Fivetran account info endpoint, /v1/account/info."
|
|
289
296
|
),
|
|
290
297
|
)
|
|
@@ -1911,6 +1918,8 @@ def _should_delegate_to_sdk(argv: Sequence[str]) -> bool:
|
|
|
1911
1918
|
command = _first_command_token(argv)
|
|
1912
1919
|
if command is None:
|
|
1913
1920
|
return False
|
|
1921
|
+
if command == BETA_COMMAND:
|
|
1922
|
+
return False
|
|
1914
1923
|
if command in REST_RESOURCE_NAMES:
|
|
1915
1924
|
return False
|
|
1916
1925
|
if get_close_matches(command, REST_RESOURCE_NAMES, n=1):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fivetran-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.13
|
|
4
4
|
Summary: Command line wrapper for the Fivetran REST API and Connector SDK
|
|
5
5
|
Author: Fivetran
|
|
6
6
|
License-Expression: MIT
|
|
@@ -19,8 +19,13 @@ Dynamic: license-file
|
|
|
19
19
|
|
|
20
20
|
Thin command line wrapper around the Fivetran REST API and Connector SDK.
|
|
21
21
|
|
|
22
|
+
> **Beta:** Fivetran REST API commands are exposed under `fivetran beta` while
|
|
23
|
+
> their command names, flags, and output formatting are still stabilizing.
|
|
24
|
+
> Connector SDK commands remain available at their established top-level shape,
|
|
25
|
+
> for example `fivetran deploy`.
|
|
26
|
+
|
|
22
27
|
```text
|
|
23
|
-
fivetran [global-options] <resource> <operation> [arguments] [options]
|
|
28
|
+
fivetran [global-options] beta <resource> <operation> [arguments] [options]
|
|
24
29
|
```
|
|
25
30
|
|
|
26
31
|
## Installation
|
|
@@ -34,14 +39,14 @@ Verify the installed CLI:
|
|
|
34
39
|
```bash
|
|
35
40
|
fivetran --help
|
|
36
41
|
fivetran deploy --help
|
|
37
|
-
fivetran connection list --help
|
|
42
|
+
fivetran beta connection list --help
|
|
38
43
|
```
|
|
39
44
|
|
|
40
45
|
Credentials default to `FIVETRAN_API_KEY`. Set it to the single Base64-encoded API key shown by Fivetran. Or you can also pass it in via `--api-key` option.
|
|
41
46
|
|
|
42
47
|
```bash
|
|
43
|
-
fivetran --api-key "$FIVETRAN_API_KEY" connection list
|
|
44
|
-
fivetran connection create --config-file connection.json
|
|
48
|
+
fivetran --api-key "$FIVETRAN_API_KEY" beta connection list
|
|
49
|
+
fivetran beta connection create --config-file connection.json
|
|
45
50
|
fivetran deploy
|
|
46
51
|
```
|
|
47
52
|
|
|
@@ -50,10 +55,10 @@ fivetran deploy
|
|
|
50
55
|
Global options may be placed before or after the resource command.
|
|
51
56
|
|
|
52
57
|
```bash
|
|
53
|
-
fivetran connection list --api-key "$FIVETRAN_API_KEY"
|
|
54
|
-
fivetran connection-schema get connection_id
|
|
55
|
-
fivetran connector-metadata get google_ads
|
|
56
|
-
fivetran public-connector list
|
|
58
|
+
fivetran beta connection list --api-key "$FIVETRAN_API_KEY"
|
|
59
|
+
fivetran beta connection-schema get connection_id
|
|
60
|
+
fivetran beta connector-metadata get google_ads
|
|
61
|
+
fivetran beta public-connector list
|
|
57
62
|
```
|
|
58
63
|
|
|
59
64
|
Output defaults to readable text: list responses render as aligned, color-coded
|
|
@@ -61,9 +66,9 @@ tables and detail responses as aligned key/value sections. Use `--output json`
|
|
|
61
66
|
for compact JSON for scripting. Flag and config conventions follow the dbt CLI.
|
|
62
67
|
|
|
63
68
|
```bash
|
|
64
|
-
fivetran connection list # default text table
|
|
65
|
-
fivetran connection get connection_id # default text detail
|
|
66
|
-
fivetran connection list --output json # compact JSON
|
|
69
|
+
fivetran beta connection list # default text table
|
|
70
|
+
fivetran beta connection get connection_id # default text detail
|
|
71
|
+
fivetran beta connection list --output json # compact JSON
|
|
67
72
|
```
|
|
68
73
|
|
|
69
74
|
Output options (each with a `FIVETRAN_*` env override where noted):
|
|
@@ -86,8 +91,8 @@ output.
|
|
|
86
91
|
Create and update commands accept configuration as inline JSON or a JSON file:
|
|
87
92
|
|
|
88
93
|
```bash
|
|
89
|
-
fivetran private-link create --config-file private-link.json
|
|
90
|
-
fivetran connection-schema column update connection_id schema table column --config '{"enabled":false}'
|
|
94
|
+
fivetran beta private-link create --config-file private-link.json
|
|
95
|
+
fivetran beta connection-schema column update connection_id schema table column --config '{"enabled":false}'
|
|
91
96
|
```
|
|
92
97
|
|
|
93
98
|
Destructive commands require `--yes` in non-interactive mode.
|
|
@@ -48,7 +48,7 @@ class CliTests(unittest.TestCase):
|
|
|
48
48
|
holder["client"] = FakeClient(config)
|
|
49
49
|
return holder["client"]
|
|
50
50
|
|
|
51
|
-
code = run(argv, client_factory=factory, stdout=stdout, stderr=stderr)
|
|
51
|
+
code = run(["beta", *argv], client_factory=factory, stdout=stdout, stderr=stderr)
|
|
52
52
|
return code, stdout.getvalue(), stderr.getvalue(), holder.get("client")
|
|
53
53
|
|
|
54
54
|
def test_connection_list_maps_filters_and_pagination(self):
|
|
@@ -137,7 +137,15 @@ class CliTests(unittest.TestCase):
|
|
|
137
137
|
parser = cli.build_parser()
|
|
138
138
|
|
|
139
139
|
with patch("sys.stderr", io.StringIO()), self.assertRaises(SystemExit) as context:
|
|
140
|
-
parser.parse_args(["--api-key", "key", "connection", "create", "--data", "{}"])
|
|
140
|
+
parser.parse_args(["--api-key", "key", "beta", "connection", "create", "--data", "{}"])
|
|
141
|
+
|
|
142
|
+
self.assertEqual(context.exception.code, 2)
|
|
143
|
+
|
|
144
|
+
def test_rest_commands_are_nested_under_beta(self):
|
|
145
|
+
parser = cli.build_parser()
|
|
146
|
+
|
|
147
|
+
with patch("sys.stderr", io.StringIO()), self.assertRaises(SystemExit) as context:
|
|
148
|
+
parser.parse_args(["connection", "list"])
|
|
141
149
|
|
|
142
150
|
self.assertEqual(context.exception.code, 2)
|
|
143
151
|
|
|
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
|