File size: 396 Bytes
6861d19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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()
|