Skip to main content
Version: 1.38

Authentication

There are two methods of authenticating with the Deeploy Python client. These are a personal key pair and a Deployment API token. Both methods give different levels of access to Deeploy.

Personal Access Keys

Personal Access Keys are generated from the Account section of the Deeploy UI. The use of these keys allows for access to all the functionalities that would otherwise be available to you in the UI, including deploy, predict and explain.

These keys should only be used by the person that generated them, not by any applications. For that we use Deployment Tokens.

The client can be initialised using these keys like so:

from deeploy import Client

client = Client(
# if using the Deeploy cloud version 'host' is 'app.deeploy.ml'
host="example.deeploy.ml",
workspace_id="b6d8c781-2526-4e03-9b43-4c1a62d064db",
access_key="DPAexample",
secret_key="Sexample",
)

Deployment Tokens

Deployment Tokens are generated from the Tokens page of a single Deployment. Deployment Tokens grant you (or your application) access to all functionalties related to the Deployment it is connected to, including predict, explain, evaluate (when selected) and submitting actuals.

Deployment Tokens are to be used by applications that consume predictions/explanations from a Deployment or that need to update a Deployment.

The client can be initialised using a Deployment Token like so:

from deeploy import Client

client = Client(
# if using the Deeploy cloud version 'host' is 'app.deeploy.ml'
host="example.deeploy.ml",
workspace_id="b6d8c781-2526-4e03-9b43-4c1a62d064db",
deployment_token="DPTexample",
)