-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase_sataset.py
More file actions
54 lines (33 loc) · 1012 Bytes
/
database_sataset.py
File metadata and controls
54 lines (33 loc) · 1012 Bytes
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import dataset
def insert(disname, uid, upassword):
db = dataset.connect("sqlite:///user.sqlite")
address = db["userdata"]
disname = str(disname)
uid = str(uid)
upassword = str(upassword)
# address.insert({"name": disname, "id": id, "password": password})
# address.insert(dict(name = disname, id = uid, password = upassword))
dict = {}
dict["name"] = disname
dict["id"] = uid
dict["password"] = upassword
print(dict)
address.insert(dict)
def searchid(disname):
db = dataset.connect("sqlite:///user.sqlite")
address = db["userdata"]
id = address.find_one(name = disname)
print(id)
return id
def searchpass(disname):
db = dataset.connect("https:///user.sqlite")
address = db["userdata"]
password = address.find_one(name = disname)
print(password)
return password
"""
def searchurl(disname):
db = dataset.connect("sqlite:///url.sqlite")
address = db["url"]
url = address.find_one()
"""