hisham-cmd commited on
Commit
717cfc8
·
verified ·
1 Parent(s): 09ebb6b

Delete dump_users.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. dump_users.py +0 -31
dump_users.py DELETED
@@ -1,31 +0,0 @@
1
- import sqlite3
2
- import os
3
-
4
- def list_users():
5
- db_path = 'vortex.db'
6
- if not os.path.exists(db_path):
7
- print(f"Error: Database file {db_path} not found.")
8
- return
9
-
10
- try:
11
- conn = sqlite3.connect(db_path)
12
- cursor = conn.cursor()
13
- cursor.execute("SELECT id, name, email, role FROM users")
14
- users = cursor.fetchall()
15
-
16
- if not users:
17
- print("No users found in the database.")
18
- else:
19
- print(f"{'ID':<5} | {'Name':<20} | {'Email':<30} | {'Role':<10}")
20
- print("-" * 75)
21
- for user in users:
22
- print(f"{user[0]:<5} | {user[1]:<20} | {user[2]:<30} | {user[3]:<10}")
23
-
24
- except sqlite3.Error as e:
25
- print(f"Database error: {e}")
26
- finally:
27
- if conn:
28
- conn.close()
29
-
30
- if __name__ == "__main__":
31
- list_users()