You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add the config token directly in the request instead of creating a config file #144
Is your feature request related to a problem? Please describe.
I work in standalone data integration pipeline and it's tedious to write the config file from the environment variable values every time a new one is triggered. Would it be possible to add the API credentials directly in the request ?
@12rambau you can just use environment variables CDSAPI_URL and CDSAPI_KEY, so what you want is already possible and very simple to achieve. cdsapi will just take the values from the env vars and work as it always does. Could you check this and close the issue if it indeed works for you?
oh thatt's absolutely perfect, can you point me to the documetnation that describes this behaviour ? I did't manage to find it and I would love to share it with my colleagues.
I am also just another user and I am not aware of any documentation of cdsapi to be honest, besides the examples on the cds website. But this is the code where the env vars are read:
Activity
veenstrajelmer commentedon May 15, 2025
@12rambau you can just use environment variables
CDSAPI_URLandCDSAPI_KEY, so what you want is already possible and very simple to achieve. cdsapi will just take the values from the env vars and work as it always does. Could you check this and close the issue if it indeed works for you?12rambau commentedon May 15, 2025
oh thatt's absolutely perfect, can you point me to the documetnation that describes this behaviour ? I did't manage to find it and I would love to share it with my colleagues.
veenstrajelmer commentedon May 15, 2025
I am also just another user and I am not aware of any documentation of cdsapi to be honest, besides the examples on the cds website. But this is the code where the env vars are read:
cdsapi/cdsapi/api.py
Lines 48 to 52 in 72d7cec
And cdsapi also uses env vars in their github testbank:
cdsapi/.github/workflows/check-and-publish.yml
Lines 61 to 62 in 72d7cec