Download AgenticControl/check_user_cli.py from Asad999/Texbase: direct link, hf CLI and curl.
- Browser
- Download file 549 Bytes
-
https://huggingface.co/spaces/Asad999/Texbase/resolve/main/AgenticControl/check_user_cli.py
- Command line
-
hf download hf://spaces/Asad999/Texbase/AgenticControl/check_user_cli.py
-
curl -L -o check_user_cli.py https://huggingface.co/spaces/Asad999/Texbase/resolve/main/AgenticControl/check_user_cli.py
549 Bytes
| #!/usr/bin/env python3 | |
| """ | |
| CLI wrapper: called by Node.js to check if user exists. | |
| Usage: python3 check_user_cli.py <email> | |
| Output: JSON → {"exists": true} or {"exists": false} | |
| """ | |
| import sys | |
| import json | |
| import os | |
| # Ensure we can import personeldata from the same folder | |
| sys.path.insert(0, os.path.dirname(__file__)) | |
| from personeldata import check_user_exists | |
| if len(sys.argv) < 2: | |
| print(json.dumps({"error": "No email provided"})) | |
| sys.exit(1) | |
| email = sys.argv[1] | |
| exists = check_user_exists(email) | |
| print(json.dumps({"exists": exists})) | |