proxygen-cli 2.1.4__tar.gz → 2.1.6__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.
- proxygen_cli-2.1.6/PKG-INFO +104 -0
- proxygen_cli-2.1.6/README.md +79 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/pyproject.toml +2 -2
- proxygen_cli-2.1.4/PKG-INFO +0 -71
- proxygen_cli-2.1.4/README.md +0 -45
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/__init__.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/cli/command_credentials.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/cli/command_docker.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/cli/command_instance.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/cli/command_main.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/cli/command_secret.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/cli/command_settings.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/cli/command_spec.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/lib/auth.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/lib/constants.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/lib/credentials.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/lib/dot_proxygen.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/lib/output.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/lib/proxygen_api.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/lib/settings.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/lib/spec.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/lib/spec_server.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/lib/version.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/test/__init__.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/test/command_credentials_test.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/test/command_instance_test.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/test/command_main_test.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/test/command_secret_test.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/test/command_settings_test.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/test/command_spec_test.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/test/conftest.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/test/fixtures/client.key +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/test/fixtures/client.pem +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/test/fixtures/secret.txt +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/test/mock_private_key.py +0 -0
- {proxygen_cli-2.1.4 → proxygen_cli-2.1.6}/proxygen_cli/test/validate_cli_version_test.py +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: proxygen-cli
|
|
3
|
+
Version: 2.1.6
|
|
4
|
+
Summary: CLI for interacting with NHSD APIM's proxygen service
|
|
5
|
+
Home-page: https://github.com/NHSDigital/proxygen-cli
|
|
6
|
+
Author: Ben Strutt
|
|
7
|
+
Author-email: ben.strutt1@nhs.net
|
|
8
|
+
Requires-Python: >=3.9,<4.0
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Requires-Dist: click (>=8.1.3,<9.0.0)
|
|
15
|
+
Requires-Dist: cryptography (>=42.0,<43.0)
|
|
16
|
+
Requires-Dist: lxml (>=4.7.1,<5.0.0)
|
|
17
|
+
Requires-Dist: pydantic (>=1.9.1,<2.0.0)
|
|
18
|
+
Requires-Dist: pyjwt (>=2.3.0,<3.0.0)
|
|
19
|
+
Requires-Dist: pyyaml (>=6.0,<7.0)
|
|
20
|
+
Requires-Dist: requests (>=2.27.1,<3.0.0)
|
|
21
|
+
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
|
22
|
+
Requires-Dist: yaspin (>=2.2.0,<3.0.0)
|
|
23
|
+
Project-URL: Repository, https://github.com/NHSDigital/proxygen-cli
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# proxygen-cli
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
Installation is straightforward using pip:
|
|
31
|
+
```
|
|
32
|
+
pip install proxygen-cli
|
|
33
|
+
```
|
|
34
|
+
After installation, the `proxygen` executable is available. Typing `proxygen` displays a list of available commands.
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## Configuration
|
|
38
|
+
|
|
39
|
+
### Credentials
|
|
40
|
+
|
|
41
|
+
The CLI requires client credentials, which can be obtained from the `platforms-api-producer-support` Slack channel.
|
|
42
|
+
|
|
43
|
+
All users should also have individual credentials. `proxygen-cli` needs to know about them.
|
|
44
|
+
You can setup the credentials in `proxygen-cli` using:
|
|
45
|
+
```
|
|
46
|
+
proxygen credentials set
|
|
47
|
+
```
|
|
48
|
+
This command prompts you to enter your `client_id`, `client_secret`, `username`, and `password`.
|
|
49
|
+
To update credentials in the future, use:
|
|
50
|
+
```
|
|
51
|
+
proxygen credentials set <KEY> <VALUE>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Settings
|
|
56
|
+
To specify the API you are developing for, use:
|
|
57
|
+
```
|
|
58
|
+
proxygen settings set api <API-NAME>
|
|
59
|
+
```
|
|
60
|
+
Your user must have the appropriate permissions for managing instances, secrets, and specifications related to the specified API. If permissions are insufficient, commands will fail. Reach out to the `platforms-api-producer-support` channel for assistance with permissions.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## Commands
|
|
64
|
+
Commands are documented inside the CLI itself.
|
|
65
|
+
Type `proxygen` to see a full list of available commands.
|
|
66
|
+
|
|
67
|
+
For a full user guide for `proxygen-cli` see this [confluence page](https://nhsd-confluence.digital.nhs.uk/display/APM/Proxygen+CLI+user+guide).
|
|
68
|
+
|
|
69
|
+
### Deploying an API instance
|
|
70
|
+
To deploy an instance of an API you will need an OAS specification file. The OAS specification file can be deployed to an environment using the following command:
|
|
71
|
+
```
|
|
72
|
+
proxygen instance deploy <env> <base-path> path/to/specification.yaml
|
|
73
|
+
```
|
|
74
|
+
To manage your instances type `proxygen instance --help` for a list of available commands.
|
|
75
|
+
|
|
76
|
+
### Publishing an API sepcification
|
|
77
|
+
To publish your API specification, first deploy it on the UAT version of Bloomreach, then on production. Publishing to UAT allows you to preview the API documentation's appearance and catch any errors in the code before going live.
|
|
78
|
+
|
|
79
|
+
Use the following command to publish an API specification:
|
|
80
|
+
```
|
|
81
|
+
# Production
|
|
82
|
+
proxygen spec publish <path_to_spec>
|
|
83
|
+
|
|
84
|
+
# UAT
|
|
85
|
+
proxygen spec publish <path_to_spec> --uat
|
|
86
|
+
```
|
|
87
|
+
To manage your instances type `proxygen spec --help` for a list of available commands.
|
|
88
|
+
|
|
89
|
+
### Deploying a secret
|
|
90
|
+
The API key, considered sensitive information, is securely stored within the API platform as a 'secret'. Before configuring any instances reliant on this key, it's necessary to deploy it.
|
|
91
|
+
|
|
92
|
+
Use the following command to deploy a secret:
|
|
93
|
+
```
|
|
94
|
+
proxygen secret put <env> <apikey> --apikey --secret-file path/to/secret.txt
|
|
95
|
+
```
|
|
96
|
+
To manage your instances type `proxygen secret --help` for a list of available commands.
|
|
97
|
+
|
|
98
|
+
### Interacting with your docker repository
|
|
99
|
+
To enable the push and pull of images from the API Management ECR repository, you will need to acquire authentication details.
|
|
100
|
+
|
|
101
|
+
Use the following command to obtain a docker token:
|
|
102
|
+
```
|
|
103
|
+
$(proxygen docker get-login)
|
|
104
|
+
```
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# proxygen-cli
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
Installation is straightforward using pip:
|
|
6
|
+
```
|
|
7
|
+
pip install proxygen-cli
|
|
8
|
+
```
|
|
9
|
+
After installation, the `proxygen` executable is available. Typing `proxygen` displays a list of available commands.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Configuration
|
|
13
|
+
|
|
14
|
+
### Credentials
|
|
15
|
+
|
|
16
|
+
The CLI requires client credentials, which can be obtained from the `platforms-api-producer-support` Slack channel.
|
|
17
|
+
|
|
18
|
+
All users should also have individual credentials. `proxygen-cli` needs to know about them.
|
|
19
|
+
You can setup the credentials in `proxygen-cli` using:
|
|
20
|
+
```
|
|
21
|
+
proxygen credentials set
|
|
22
|
+
```
|
|
23
|
+
This command prompts you to enter your `client_id`, `client_secret`, `username`, and `password`.
|
|
24
|
+
To update credentials in the future, use:
|
|
25
|
+
```
|
|
26
|
+
proxygen credentials set <KEY> <VALUE>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Settings
|
|
31
|
+
To specify the API you are developing for, use:
|
|
32
|
+
```
|
|
33
|
+
proxygen settings set api <API-NAME>
|
|
34
|
+
```
|
|
35
|
+
Your user must have the appropriate permissions for managing instances, secrets, and specifications related to the specified API. If permissions are insufficient, commands will fail. Reach out to the `platforms-api-producer-support` channel for assistance with permissions.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## Commands
|
|
39
|
+
Commands are documented inside the CLI itself.
|
|
40
|
+
Type `proxygen` to see a full list of available commands.
|
|
41
|
+
|
|
42
|
+
For a full user guide for `proxygen-cli` see this [confluence page](https://nhsd-confluence.digital.nhs.uk/display/APM/Proxygen+CLI+user+guide).
|
|
43
|
+
|
|
44
|
+
### Deploying an API instance
|
|
45
|
+
To deploy an instance of an API you will need an OAS specification file. The OAS specification file can be deployed to an environment using the following command:
|
|
46
|
+
```
|
|
47
|
+
proxygen instance deploy <env> <base-path> path/to/specification.yaml
|
|
48
|
+
```
|
|
49
|
+
To manage your instances type `proxygen instance --help` for a list of available commands.
|
|
50
|
+
|
|
51
|
+
### Publishing an API sepcification
|
|
52
|
+
To publish your API specification, first deploy it on the UAT version of Bloomreach, then on production. Publishing to UAT allows you to preview the API documentation's appearance and catch any errors in the code before going live.
|
|
53
|
+
|
|
54
|
+
Use the following command to publish an API specification:
|
|
55
|
+
```
|
|
56
|
+
# Production
|
|
57
|
+
proxygen spec publish <path_to_spec>
|
|
58
|
+
|
|
59
|
+
# UAT
|
|
60
|
+
proxygen spec publish <path_to_spec> --uat
|
|
61
|
+
```
|
|
62
|
+
To manage your instances type `proxygen spec --help` for a list of available commands.
|
|
63
|
+
|
|
64
|
+
### Deploying a secret
|
|
65
|
+
The API key, considered sensitive information, is securely stored within the API platform as a 'secret'. Before configuring any instances reliant on this key, it's necessary to deploy it.
|
|
66
|
+
|
|
67
|
+
Use the following command to deploy a secret:
|
|
68
|
+
```
|
|
69
|
+
proxygen secret put <env> <apikey> --apikey --secret-file path/to/secret.txt
|
|
70
|
+
```
|
|
71
|
+
To manage your instances type `proxygen secret --help` for a list of available commands.
|
|
72
|
+
|
|
73
|
+
### Interacting with your docker repository
|
|
74
|
+
To enable the push and pull of images from the API Management ECR repository, you will need to acquire authentication details.
|
|
75
|
+
|
|
76
|
+
Use the following command to obtain a docker token:
|
|
77
|
+
```
|
|
78
|
+
$(proxygen docker get-login)
|
|
79
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "proxygen-cli"
|
|
3
|
-
version = "2.1.
|
|
3
|
+
version = "2.1.6"
|
|
4
4
|
description = "CLI for interacting with NHSD APIM's proxygen service"
|
|
5
5
|
authors = ["Ben Strutt <ben.strutt1@nhs.net>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -17,7 +17,7 @@ click = "^8.1.3"
|
|
|
17
17
|
pyjwt = "^2.3.0"
|
|
18
18
|
requests = "^2.27.1"
|
|
19
19
|
lxml = "^4.7.1"
|
|
20
|
-
cryptography = "^
|
|
20
|
+
cryptography = "^42.0"
|
|
21
21
|
pyyaml = "^6.0"
|
|
22
22
|
yaspin = "^2.2.0"
|
|
23
23
|
tabulate = "^0.9.0"
|
proxygen_cli-2.1.4/PKG-INFO
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: proxygen-cli
|
|
3
|
-
Version: 2.1.4
|
|
4
|
-
Summary: CLI for interacting with NHSD APIM's proxygen service
|
|
5
|
-
Home-page: https://github.com/NHSDigital/proxygen-cli
|
|
6
|
-
Author: Ben Strutt
|
|
7
|
-
Author-email: ben.strutt1@nhs.net
|
|
8
|
-
Requires-Python: >=3.9,<4.0
|
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Requires-Dist: click (>=8.1.3,<9.0.0)
|
|
15
|
-
Requires-Dist: cryptography (>=36.0.1,<37.0.0)
|
|
16
|
-
Requires-Dist: lxml (>=4.7.1,<5.0.0)
|
|
17
|
-
Requires-Dist: pydantic (>=1.9.1,<2.0.0)
|
|
18
|
-
Requires-Dist: pyjwt (>=2.3.0,<3.0.0)
|
|
19
|
-
Requires-Dist: pyyaml (>=6.0,<7.0)
|
|
20
|
-
Requires-Dist: requests (>=2.27.1,<3.0.0)
|
|
21
|
-
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
|
22
|
-
Requires-Dist: yaspin (>=2.2.0,<3.0.0)
|
|
23
|
-
Project-URL: Repository, https://github.com/NHSDigital/proxygen-cli
|
|
24
|
-
Description-Content-Type: text/markdown
|
|
25
|
-
|
|
26
|
-
# proxygen-cli
|
|
27
|
-
|
|
28
|
-
## Installation
|
|
29
|
-
|
|
30
|
-
Should be as simple as
|
|
31
|
-
```
|
|
32
|
-
pip install proxygen-cli
|
|
33
|
-
```
|
|
34
|
-
The python package includes an execuatable `proxygen`.
|
|
35
|
-
Type `proxygen` to see a list of available commands.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
## Configuration
|
|
39
|
-
|
|
40
|
-
### Credentials
|
|
41
|
-
|
|
42
|
-
The CLI has its own client credentials, which need to be input.
|
|
43
|
-
Contact `deathstar` squad or the `platforms-api-producer-support` slack channel to find out what they are.
|
|
44
|
-
|
|
45
|
-
All users should also have individual credentials. `proxygen-cli` needs to know about them.
|
|
46
|
-
|
|
47
|
-
Simply execute the following command which will prompt you to enter your `client_id`, `client_secret`, `username`, and `password`:
|
|
48
|
-
```
|
|
49
|
-
proxygen credentials set
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
If you need to update any credentials in the future, use the following command:
|
|
53
|
-
```
|
|
54
|
-
proxygen credentials set <KEY> <VALUE>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
### Settings
|
|
59
|
-
`proxygen-cli` needs to know what API you are developing.
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
proxygen settings set api <API-NAME>
|
|
63
|
-
```
|
|
64
|
-
Your user must have permissions to manipulate instances/secrets/specs for the API you set here.
|
|
65
|
-
If you do not have sufficient permissions commands will fail.
|
|
66
|
-
If you believe your permissions are incorrect, contact the `platforms-api-producer-support` channel.
|
|
67
|
-
|
|
68
|
-
## Commands
|
|
69
|
-
Commands are documented inside the CLI itself.
|
|
70
|
-
Type `proxygen` to see a list of available commands.
|
|
71
|
-
|
proxygen_cli-2.1.4/README.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# proxygen-cli
|
|
2
|
-
|
|
3
|
-
## Installation
|
|
4
|
-
|
|
5
|
-
Should be as simple as
|
|
6
|
-
```
|
|
7
|
-
pip install proxygen-cli
|
|
8
|
-
```
|
|
9
|
-
The python package includes an execuatable `proxygen`.
|
|
10
|
-
Type `proxygen` to see a list of available commands.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Configuration
|
|
14
|
-
|
|
15
|
-
### Credentials
|
|
16
|
-
|
|
17
|
-
The CLI has its own client credentials, which need to be input.
|
|
18
|
-
Contact `deathstar` squad or the `platforms-api-producer-support` slack channel to find out what they are.
|
|
19
|
-
|
|
20
|
-
All users should also have individual credentials. `proxygen-cli` needs to know about them.
|
|
21
|
-
|
|
22
|
-
Simply execute the following command which will prompt you to enter your `client_id`, `client_secret`, `username`, and `password`:
|
|
23
|
-
```
|
|
24
|
-
proxygen credentials set
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
If you need to update any credentials in the future, use the following command:
|
|
28
|
-
```
|
|
29
|
-
proxygen credentials set <KEY> <VALUE>
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
### Settings
|
|
34
|
-
`proxygen-cli` needs to know what API you are developing.
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
proxygen settings set api <API-NAME>
|
|
38
|
-
```
|
|
39
|
-
Your user must have permissions to manipulate instances/secrets/specs for the API you set here.
|
|
40
|
-
If you do not have sufficient permissions commands will fail.
|
|
41
|
-
If you believe your permissions are incorrect, contact the `platforms-api-producer-support` channel.
|
|
42
|
-
|
|
43
|
-
## Commands
|
|
44
|
-
Commands are documented inside the CLI itself.
|
|
45
|
-
Type `proxygen` to see a list of available commands.
|
|
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
|