Download list_secrets.py from FincH12/Automation_Threads_EU: direct link, hf CLI and curl.
- Browser
- Download file 415 Bytes
-
https://huggingface.co/spaces/FincH12/Automation_Threads_EU/resolve/main/list_secrets.py
- Command line
-
hf download hf://spaces/FincH12/Automation_Threads_EU/list_secrets.py
-
curl -L -o list_secrets.py https://huggingface.co/spaces/FincH12/Automation_Threads_EU/resolve/main/list_secrets.py
415 Bytes
| import requests | |
| from huggingface_hub import get_token | |
| token = get_token() | |
| headers = {"Authorization": f"Bearer {token}"} | |
| url = "https://huggingface.co/api/spaces/FincH12/Automation_Threads/secrets" | |
| resp = requests.get(url, headers=headers) | |
| if resp.status_code == 200: | |
| for s in resp.json(): | |
| print(f"Found secret: {s['name']}") | |
| else: | |
| print(f"Failed to fetch secrets: {resp.status_code} {resp.text}") | |