fivetran-cli 0.1.0__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.0/LICENSE +21 -0
- fivetran_cli-0.1.0/MANIFEST.in +5 -0
- fivetran_cli-0.1.0/PKG-INFO +167 -0
- fivetran_cli-0.1.0/README.md +151 -0
- fivetran_cli-0.1.0/pyproject.toml +28 -0
- fivetran_cli-0.1.0/setup.cfg +4 -0
- fivetran_cli-0.1.0/src/fivetran_cli/__init__.py +3 -0
- fivetran_cli-0.1.0/src/fivetran_cli/__main__.py +5 -0
- fivetran_cli-0.1.0/src/fivetran_cli/cli.py +1472 -0
- fivetran_cli-0.1.0/src/fivetran_cli/client.py +159 -0
- fivetran_cli-0.1.0/src/fivetran_cli/output.py +121 -0
- fivetran_cli-0.1.0/src/fivetran_cli.egg-info/PKG-INFO +167 -0
- fivetran_cli-0.1.0/src/fivetran_cli.egg-info/SOURCES.txt +16 -0
- fivetran_cli-0.1.0/src/fivetran_cli.egg-info/dependency_links.txt +1 -0
- fivetran_cli-0.1.0/src/fivetran_cli.egg-info/entry_points.txt +2 -0
- fivetran_cli-0.1.0/src/fivetran_cli.egg-info/top_level.txt +1 -0
- fivetran_cli-0.1.0/tests/test_cli.py +441 -0
- fivetran_cli-0.1.0/tests/test_client.py +59 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Fivetran
|
|
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.
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fivetran-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Command line wrapper for the Fivetran REST API
|
|
5
|
+
Author: Fivetran
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Classifier: Environment :: Console
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Requires-Python: >=3.11
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# fivetran-cli
|
|
18
|
+
|
|
19
|
+
Thin command line wrapper around the Fivetran REST API.
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
fivetran [global-options] <resource> <operation> [arguments] [options]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Credentials default to `FIVETRAN_API_KEY` and `FIVETRAN_API_SECRET`.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
fivetran --api-key "$FIVETRAN_API_KEY" --api-secret "$FIVETRAN_API_SECRET" connection list
|
|
29
|
+
fivetran connection create --data-file connection.json
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
Global options may be placed before or after the resource command.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
fivetran connection list --api-key "$FIVETRAN_API_KEY" --api-secret "$FIVETRAN_API_SECRET"
|
|
38
|
+
fivetran connection-schema get connection_id
|
|
39
|
+
fivetran connector-metadata get google_ads
|
|
40
|
+
fivetran public-connector list
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Output defaults to JSON. Use `--format table`, `--format yaml`, or `--output path` when needed.
|
|
44
|
+
|
|
45
|
+
Request body commands accept either raw JSON or a JSON file:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
fivetran private-link create --data-file private-link.json
|
|
49
|
+
fivetran connection-schema column update connection_id schema table column --data '{"enabled":false}'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Destructive commands require `--yes` in non-interactive mode.
|
|
53
|
+
|
|
54
|
+
## Included Commands
|
|
55
|
+
|
|
56
|
+
Core resources:
|
|
57
|
+
|
|
58
|
+
- `account get`
|
|
59
|
+
- `connection list|get|create|update|delete|sync|resync|test`
|
|
60
|
+
- `destination list|get|create|update|delete|test`
|
|
61
|
+
- `group list|get|create|update|delete`
|
|
62
|
+
- `group connection list`
|
|
63
|
+
- `group user list|add|remove`
|
|
64
|
+
- `group public-key get`
|
|
65
|
+
- `group service-account get`
|
|
66
|
+
|
|
67
|
+
Access management:
|
|
68
|
+
|
|
69
|
+
- `user list|get|invite|update|delete`
|
|
70
|
+
- `user account-role remove`
|
|
71
|
+
- `user connection list|get|add|update|remove`
|
|
72
|
+
- `user group list|get|add|update|remove`
|
|
73
|
+
- `team list|get|create|update|delete`
|
|
74
|
+
- `team account-role remove`
|
|
75
|
+
- `team connection list|get|add|update|remove`
|
|
76
|
+
- `team group list|get|add|update|remove`
|
|
77
|
+
- `team user list|get|add|update|remove`
|
|
78
|
+
- `role list`
|
|
79
|
+
- `system-key list|get|create|update|delete|rotate`
|
|
80
|
+
|
|
81
|
+
Schemas and metadata:
|
|
82
|
+
|
|
83
|
+
- `connection-schema get|setup|update|reload|resync-table`
|
|
84
|
+
- `connection-schema schema update`
|
|
85
|
+
- `connection-schema table update`
|
|
86
|
+
- `connection-schema column list|update|drop|drop-blocked`
|
|
87
|
+
- `connector-metadata list|get`
|
|
88
|
+
- `public-connector list`
|
|
89
|
+
|
|
90
|
+
Networking:
|
|
91
|
+
|
|
92
|
+
- `hybrid-deployment-agent list|get|create|delete|regenerate-auth|reset-credentials`
|
|
93
|
+
- `proxy-agent list|get|create|delete|regenerate-secrets`
|
|
94
|
+
- `proxy-agent connection list`
|
|
95
|
+
- `private-link list|get|create|update|delete`
|
|
96
|
+
|
|
97
|
+
Transformations:
|
|
98
|
+
|
|
99
|
+
- `transformation list`
|
|
100
|
+
|
|
101
|
+
## Not Included Yet
|
|
102
|
+
|
|
103
|
+
These API areas are still intentionally not implemented:
|
|
104
|
+
|
|
105
|
+
- Certificates and fingerprints
|
|
106
|
+
- Connector SDK packages
|
|
107
|
+
- Log services
|
|
108
|
+
- Webhooks
|
|
109
|
+
- Transformation create/get/update/delete/run/cancel/upgrade
|
|
110
|
+
- Transformation package metadata
|
|
111
|
+
- Transformation projects
|
|
112
|
+
- Hub registration
|
|
113
|
+
- Group destination listing, pending confirmation of a supported REST endpoint
|
|
114
|
+
- Interactive connector setup workflows
|
|
115
|
+
- File upload/download handling for Connector SDK packages
|
|
116
|
+
- High-quality resource-specific table formats beyond the generic table renderer
|
|
117
|
+
|
|
118
|
+
## Build And Publish
|
|
119
|
+
|
|
120
|
+
Package artifacts are controlled by `pyproject.toml` and `MANIFEST.in`. The source distribution intentionally excludes local agent/project-planning files:
|
|
121
|
+
|
|
122
|
+
- `AGENTS.md`
|
|
123
|
+
- `plans/`
|
|
124
|
+
|
|
125
|
+
Install local packaging tools with `pipx`:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
pipx install build
|
|
129
|
+
pipx install twine
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
This exposes `pyproject-build` and `twine` on your PATH. If you install these tools into a virtual environment instead, use `python3 -m build` and `python3 -m twine` in place of the commands below.
|
|
133
|
+
|
|
134
|
+
Build source and wheel distributions:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
pyproject-build
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Validate the generated artifacts:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
twine check dist/*
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Upload to TestPyPI first:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
twine upload --repository testpypi dist/*
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Install from TestPyPI in a clean environment:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ fivetran-cli
|
|
156
|
+
fivetran --help
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Upload to PyPI after the TestPyPI package is verified:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
twine upload dist/*
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
These upload commands assume `~/.pypirc` is configured with the `pypi` and `testpypi` repositories. If `~/.pypirc` is not configured, set `TWINE_USERNAME=__token__` and `TWINE_PASSWORD=<api-token>` before running `twine upload`.
|
|
166
|
+
|
|
167
|
+
PyPI files are immutable for a published version. If an upload is wrong, bump the version in `pyproject.toml`, rebuild, re-check, and upload the new version.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# fivetran-cli
|
|
2
|
+
|
|
3
|
+
Thin command line wrapper around the Fivetran REST API.
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
fivetran [global-options] <resource> <operation> [arguments] [options]
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Credentials default to `FIVETRAN_API_KEY` and `FIVETRAN_API_SECRET`.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
fivetran --api-key "$FIVETRAN_API_KEY" --api-secret "$FIVETRAN_API_SECRET" connection list
|
|
13
|
+
fivetran connection create --data-file connection.json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
Global options may be placed before or after the resource command.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
fivetran connection list --api-key "$FIVETRAN_API_KEY" --api-secret "$FIVETRAN_API_SECRET"
|
|
22
|
+
fivetran connection-schema get connection_id
|
|
23
|
+
fivetran connector-metadata get google_ads
|
|
24
|
+
fivetran public-connector list
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Output defaults to JSON. Use `--format table`, `--format yaml`, or `--output path` when needed.
|
|
28
|
+
|
|
29
|
+
Request body commands accept either raw JSON or a JSON file:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
fivetran private-link create --data-file private-link.json
|
|
33
|
+
fivetran connection-schema column update connection_id schema table column --data '{"enabled":false}'
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Destructive commands require `--yes` in non-interactive mode.
|
|
37
|
+
|
|
38
|
+
## Included Commands
|
|
39
|
+
|
|
40
|
+
Core resources:
|
|
41
|
+
|
|
42
|
+
- `account get`
|
|
43
|
+
- `connection list|get|create|update|delete|sync|resync|test`
|
|
44
|
+
- `destination list|get|create|update|delete|test`
|
|
45
|
+
- `group list|get|create|update|delete`
|
|
46
|
+
- `group connection list`
|
|
47
|
+
- `group user list|add|remove`
|
|
48
|
+
- `group public-key get`
|
|
49
|
+
- `group service-account get`
|
|
50
|
+
|
|
51
|
+
Access management:
|
|
52
|
+
|
|
53
|
+
- `user list|get|invite|update|delete`
|
|
54
|
+
- `user account-role remove`
|
|
55
|
+
- `user connection list|get|add|update|remove`
|
|
56
|
+
- `user group list|get|add|update|remove`
|
|
57
|
+
- `team list|get|create|update|delete`
|
|
58
|
+
- `team account-role remove`
|
|
59
|
+
- `team connection list|get|add|update|remove`
|
|
60
|
+
- `team group list|get|add|update|remove`
|
|
61
|
+
- `team user list|get|add|update|remove`
|
|
62
|
+
- `role list`
|
|
63
|
+
- `system-key list|get|create|update|delete|rotate`
|
|
64
|
+
|
|
65
|
+
Schemas and metadata:
|
|
66
|
+
|
|
67
|
+
- `connection-schema get|setup|update|reload|resync-table`
|
|
68
|
+
- `connection-schema schema update`
|
|
69
|
+
- `connection-schema table update`
|
|
70
|
+
- `connection-schema column list|update|drop|drop-blocked`
|
|
71
|
+
- `connector-metadata list|get`
|
|
72
|
+
- `public-connector list`
|
|
73
|
+
|
|
74
|
+
Networking:
|
|
75
|
+
|
|
76
|
+
- `hybrid-deployment-agent list|get|create|delete|regenerate-auth|reset-credentials`
|
|
77
|
+
- `proxy-agent list|get|create|delete|regenerate-secrets`
|
|
78
|
+
- `proxy-agent connection list`
|
|
79
|
+
- `private-link list|get|create|update|delete`
|
|
80
|
+
|
|
81
|
+
Transformations:
|
|
82
|
+
|
|
83
|
+
- `transformation list`
|
|
84
|
+
|
|
85
|
+
## Not Included Yet
|
|
86
|
+
|
|
87
|
+
These API areas are still intentionally not implemented:
|
|
88
|
+
|
|
89
|
+
- Certificates and fingerprints
|
|
90
|
+
- Connector SDK packages
|
|
91
|
+
- Log services
|
|
92
|
+
- Webhooks
|
|
93
|
+
- Transformation create/get/update/delete/run/cancel/upgrade
|
|
94
|
+
- Transformation package metadata
|
|
95
|
+
- Transformation projects
|
|
96
|
+
- Hub registration
|
|
97
|
+
- Group destination listing, pending confirmation of a supported REST endpoint
|
|
98
|
+
- Interactive connector setup workflows
|
|
99
|
+
- File upload/download handling for Connector SDK packages
|
|
100
|
+
- High-quality resource-specific table formats beyond the generic table renderer
|
|
101
|
+
|
|
102
|
+
## Build And Publish
|
|
103
|
+
|
|
104
|
+
Package artifacts are controlled by `pyproject.toml` and `MANIFEST.in`. The source distribution intentionally excludes local agent/project-planning files:
|
|
105
|
+
|
|
106
|
+
- `AGENTS.md`
|
|
107
|
+
- `plans/`
|
|
108
|
+
|
|
109
|
+
Install local packaging tools with `pipx`:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pipx install build
|
|
113
|
+
pipx install twine
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
This exposes `pyproject-build` and `twine` on your PATH. If you install these tools into a virtual environment instead, use `python3 -m build` and `python3 -m twine` in place of the commands below.
|
|
117
|
+
|
|
118
|
+
Build source and wheel distributions:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
pyproject-build
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Validate the generated artifacts:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
twine check dist/*
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Upload to TestPyPI first:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
twine upload --repository testpypi dist/*
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Install from TestPyPI in a clean environment:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ fivetran-cli
|
|
140
|
+
fivetran --help
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Upload to PyPI after the TestPyPI package is verified:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
twine upload dist/*
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
These upload commands assume `~/.pypirc` is configured with the `pypi` and `testpypi` repositories. If `~/.pypirc` is not configured, set `TWINE_USERNAME=__token__` and `TWINE_PASSWORD=<api-token>` before running `twine upload`.
|
|
150
|
+
|
|
151
|
+
PyPI files are immutable for a published version. If an upload is wrong, bump the version in `pyproject.toml`, rebuild, re-check, and upload the new version.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "fivetran-cli"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Command line wrapper for the Fivetran REST API"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "Fivetran" }
|
|
13
|
+
]
|
|
14
|
+
license = "MIT"
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
]
|
|
22
|
+
dependencies = []
|
|
23
|
+
|
|
24
|
+
[project.scripts]
|
|
25
|
+
fivetran = "fivetran_cli.cli:main"
|
|
26
|
+
|
|
27
|
+
[tool.setuptools.packages.find]
|
|
28
|
+
where = ["src"]
|