blob: c2e4e4bca7a37b2953ac64f5212d161be937b545 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/usr/bin/env python3
# import os
# import time
import sqlite3
# database = sqlite3.connect('data.db')
class Database:
def __init__(self):
self._connection = sqlite3.connect("data.db")
self._cursor = self._connection.cursor()
# self._cursor.
# print(self._database)
print(self._cursor)
def initDB(self):
print("If db not exists...generate schema here")
def login(self, username, password):
print("try to login")
return "userobject" or False
# Use flask session management?
# What crypt/hash to use?
def getMyTracked(self, userid):
return "list of tracked users"
def msg(self, msg):
print(msg)
if __name__ == "__main__":
database = Database()
database.initDB()
database.msg("2")
|