-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtest_sqlite.html
More file actions
29 lines (27 loc) · 894 Bytes
/
test_sqlite.html
File metadata and controls
29 lines (27 loc) · 894 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
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
<script defer src="https://pyscript.net/latest/pyscript.js"></script>
</head>
<body>
<py-config>
packages = [
"sqlite-utils"
]
</py-config>
<h1>Sqlite-utils Example</h1>
<div id="myplot"></div>
<div>
<py-terminal>
</div>
<py-script>
# was ok with https://pyscript.net/2022.06.1/pyscript.js
# you can try last official release: https://pyscript.net/latest/pyscript.js and css
# or current unstable master: https://pyscript.net/unstable/pyscript.js and cssfrom __future__ import print_function, unicode_literals, division # if Python2.7
import sqlite_utils
db = sqlite_utils.Database(memory=True)
print(list(db.query("select 3 * 5")))
print('sqlite-version', list(db.query("select sqlite_version()")))
</py-script>
</body>
</html>