| import sqlite3, json | |
| from datetime import datetime | |
| class Database: | |
| def __init__(self,path): | |
| self.path=path | |
| self.ensure() | |
| def connect(self): return sqlite3.connect(self.path) | |
| def ensure(self): | |
| c=self.connect(); cur=c.cursor() | |
| cur.execute("CREATE TABLE IF NOT EXISTS users (user_id INTEGER PRIMARY KEY, full_name TEXT)") | |
| c.commit(); c.close() | |