Skip to content

Authentication

First, we need to authenticate with a Datapane Enterprise server.

Datapane has a server component which you can access through the CLI and Python library and requires an authentication token. You can authenticate through either the CLI or the Python library, and all future requests will automatically be authenticated.

Datapane Enterprise

Datapane Enterprise provides private hosted servers and supports on-premise instances for organizations. In such a case, log in to your instance, for instance https://your-company.datapane.net , using the credentials provided to you by your admin.

Similar to when using the free Datapane instance, your home page will indicate your API key and you will be able to authenticate by passing in your API key to the login command. You will need to pass in the full URL of your server (including the https://) to the login command as follows.

$ datapane login --server=https://[your-server].datapane.net
Enter your API Key: [paste your API key here]
import datapane as dp
dp.login(token=your_token, server='https://[your-server].datapane.net')

Info

The CLI supports multiple profiles using the --env flag, so you can easily work with both the default Datapane instance and your private enterprise instance at the same time.

$ datapane --env default login
$ datapane --env acme login --server=https://acme.datapane.net

Check your Authentication

To check you have access and which account you are logged in as, run:

$ datapane ping
import datapane as dp
dp.ping()