Download backend/check_users.py from Nausad/AI_Doc: direct link, hf CLI and curl.
- Browser
- Download file 374 Bytes
-
https://huggingface.co/spaces/Nausad/AI_Doc/resolve/main/backend/check_users.py
- Command line
-
hf download hf://spaces/Nausad/AI_Doc/backend/check_users.py
-
curl -L -o check_users.py https://huggingface.co/spaces/Nausad/AI_Doc/resolve/main/backend/check_users.py
374 Bytes
| import sqlite3 | |
| import os | |
| BASE_DIR = os.path.dirname(os.path.abspath(__file__)) | |
| DB_PATH = os.path.join(BASE_DIR, "database.db") | |
| conn = sqlite3.connect(DB_PATH) | |
| conn.row_factory = sqlite3.Row | |
| cur = conn.cursor() | |
| cur.execute("SELECT * FROM users") | |
| users = cur.fetchall() | |
| print("==== USERS TABLE ====") | |
| for user in users: | |
| print(dict(user)) | |
| conn.close() |