Authentication¶
Get an API key¶
- Sign in at dataspires.com.
- Go to Profile → SDK keys → Create new key, then copy the
dsp_live_...value. It is shown only once. - 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_...") |
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.