Skip to content

Authentication

Get an API key

  1. Sign in at dataspires.com.
  2. Go to Profile → SDK keys → Create new key, then copy the dsp_live_... value. It is shown only once.
  3. Save it as DATASPIRES_API_KEY.

Set the key

Environment How
Google Colab Secrets → DATASPIRES_API_KEY
Kaggle Add-ons → Secrets → DATASPIRES_API_KEY
Terminal export DATASPIRES_API_KEY=dsp_live_...
In code client.authenticate(api_key="dsp_live_...")
from dataspires import DataSpiresClient

client = DataSpiresClient()
client.authenticate()

authenticate() raises an error if the key is invalid or revoked.

Rotate a key

To rotate a key, revoke it in the dashboard and create a new one.

Gated Hugging Face models

To use gated Hugging Face models or datasets, also set HUGGINGFACE_TOKEN.

See Environment variables for the full list of variables the SDK reads.