Skip to main content

proxygen-cli

Installation

Installation is straightforward using pip:

pip install proxygen-cli

After installation, the proxygen executable is available. Typing proxygen displays a list of available commands. The proxygen --version command will show the version of the CLI installed.

Configuration

Settings

To specify the API you are developing for, use:

proxygen settings set api <API-NAME> --env <ptl/prod>

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. Parameter --env is optional, if the environment is not provided then CLI will default to Prod.

Credentials

There are two ways to authenticate via the Proxygen CLI. Either via user login credentials such as a username and password or as a machine user using your private key and client_id.

Setting up for user access

If you are setting up user access for the first time you will first need to request a user account. Contact the platforms-api-producer-support channel asking for a proxygen user account to be set up providing:

  • Your nhs.net email address
  • The proxygen-managed api/s your account will need access to

To setup the Proxygen CLI credentials for the first time with user access enter the following command:

proxygen credentials set --env <ptl/prod>

The CLI will ask you for your username, and password. These credentials will be securely stored on your local machine in the directory ~/.proxygen/credentials.yaml. The client_id and secret used for user access will be automatically added to this file after running the command. Parameter --env is optional, if the environment is not provided then CLI will default to Prod.

Your user must have permissions to manipulate instances/secrets/specs for the API you set here. If you do not have sufficient permissions commands will fail. If you believe your permissions are incorrect, contact the API platform team via the platforms-api-producer-support channel.

Setting up for machine-user access

After having set up your API using the instructions at Getting set up with proxy generator, you should have the following:

  • A private key from a key pair for machine user access
  • The key id for that specific key pair
  • The client_id for your api machine user access (usually -client)

Using this information enter the following command:

proxygen credentials set private_key_path <PATH_TO_PRIVATE_KEY> key_id <KEY_ID_FOR_PRIVATE_KEY> client_id <MACHINE_USER_CLIENT_ID> --env <ptl/prod>

The CLI will ask you for your username, and password. For machine authentication, the username and password must be left blank. The credentials will be securely stored in the directory ~/.proxygen/credentials.yaml. Parameter --env is optional, if the environment is not provided then CLI will default to Prod.

NOTE: If you are switching between using user access and machine-user access bare in mind:

  • proxygen-cli will favour user access if username and password credentials are set
  • User access uses proxygen-cli-user-client as a client_id. If you switch between access modes remember to switch the client_id
  • The value for client_secret should remain untouched as it is not used for machine-user access
  • If you lose the client_secret for then proxygen-cli-user-client then reach out to the platforms-api-producer-support channel for it
  • From version 4.0.0 CLI will prompt for client_id and client_secret instead of setting automatically.

Commands

Commands are documented inside the CLI itself. Type proxygen to see a full list of available commands.

For a full user guide for proxygen-cli see this confluence page.

Deploying an API instance

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:

proxygen instance deploy <env> <base-path> path/to/specification.yaml

To manage your instances type proxygen instance --help for a list of available commands.

Publishing an API sepcification

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.

Use the following command to publish an API specification:

# Production
proxygen spec publish <path_to_spec>

# UAT
proxygen spec publish <path_to_spec> --uat

To manage your instances type proxygen spec --help for a list of available commands.

Deploying a secret

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.

Use the following command to deploy a secret:

proxygen secret put <env> <apikey> --apikey --secret-file path/to/secret.txt

To manage your instances type proxygen secret --help for a list of available commands.

Interacting with your docker repository

To enable the push and pull of images from the API Management ECR repository, you will need to acquire authentication details.

Use the following command to obtain a docker token:

$(proxygen docker get-login)

Retrieving a token to use with the pytest-nhsd-apim python testing package

When testing using the pytest-nhsd-apim python testing package, an apigee management api token is needed. This endpoint provides this token for use in automated tests.

Use the following command to obtain the pytest-nhsd-apim token:

$(proxygen pytest_nhsd_apim get_token)

Metadata

Release files for proxygen-cli 4.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for proxygen-cli 4.0.3
File Size Uploaded
proxygen_cli-4.0.3.tar.gz 30.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for proxygen-cli 4.0.3
File Interpreter ABI Platform
proxygen_cli-4.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 69.9 kB

Release files / proxygen_cli-4.0.3.tar.gz

Download URL proxygen_cli-4.0.3.tar.gz
Size 30.1 kB
Tags Source
SHA-256 checksum
How to use checksums
eac17a5acb98137cbc468d377efcf94bb3d6903bc708f1b00c0af48b5c3b1fcc
BLAKE2b-256 checksum
How to use checksums
eb8250490a30fcd90e2c3990f5735a14d93b1e30cebe902fae939c25834c5b26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.

Transparency log

Release files / proxygen_cli-4.0.3-py3-none-any.whl

Download URL proxygen_cli-4.0.3-py3-none-any.whl
Size 39.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97998a150e85057de439556844ce3dd7b2c10bde5ddde895c0f6cffc8b9b40f3
BLAKE2b-256 checksum
How to use checksums
23a878bf6dfbe3f06a540dd7ec38f1850c592aaa8c201cc0e25dd4b3bc46779e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.

Transparency log

Release history Release notifications | RSS feed

4.0.4

2 release files

This release

4.0.3 This release

2 release files

4.0.2

2 release files

4.0.0

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.1.18

2 release files

2.1.17

2 release files

2.1.16

2 release files

2.1.15

2 release files

2.1.13

2 release files

2.1.12

2 release files

2.1.11

2 release files

2.1.10

2 release files

2.1.9

2 release files

2.1.8

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.17

2 release files

2.0.16

2 release files

2.0.15

2 release files

2.0.13

2 release files

2.0.12

2 release files

2.0.10

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page