Spaces:
Sleeping
Sleeping
Download scripts/test_sql.py from build-small-hackathon/CliniqAl: direct link, hf CLI and curl.
- Browser
- Download file 291 Bytes
-
https://huggingface.co/spaces/build-small-hackathon/CliniqAl/resolve/refs%2Fpr%2F1/scripts/test_sql.py
- Command line
-
hf download hf://spaces/build-small-hackathon/CliniqAl@refs/pr/1/scripts/test_sql.py
-
curl -L -o test_sql.py https://huggingface.co/spaces/build-small-hackathon/CliniqAl/resolve/refs%2Fpr%2F1/scripts/test_sql.py
291 Bytes
| from sqlalchemy import text | |
| from app.db.session import SessionLocal | |
| with SessionLocal() as s: | |
| rows = s.execute(text("SELECT id, name FROM patients LIMIT 20")) | |
| for r in rows: | |
| print(r) | |
| result = s.execute(text("SELECT COUNT(*) FROM patients")) | |
| print(result.scalar()) | |