Spaces:
Runtime error
Runtime error
IsaacKerson
commited on
Commit
•
5a87f31
1
Parent(s):
c56c4b1
SQLite Test
Browse files- app.py +7 -9
- requirements.txt +1 -3
- vocabulary.db +0 -0
app.py
CHANGED
@@ -1,11 +1,9 @@
|
|
1 |
import streamlit as st
|
2 |
-
import
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
st.title("With Pymongo")
|
11 |
-
st.write(movies.find_one())
|
|
|
1 |
import streamlit as st
|
2 |
+
import sqlite3
|
3 |
|
4 |
+
conn = sqlite3.connect('vocabulary.db')
|
5 |
+
cursor = conn.cursor
|
6 |
+
unit = ("Unit 1",)
|
7 |
+
cursor.execute("SELECT * FROM vocab WHERE unit = ?", unit)
|
8 |
+
st.title("With SQLite")
|
9 |
+
st.write(cursor.fetchone())
|
|
|
|
requirements.txt
CHANGED
@@ -1,3 +1 @@
|
|
1 |
-
|
2 |
-
pymongo[srv]
|
3 |
-
dnspython
|
|
|
1 |
+
pysqlite3
|
|
|
|
vocabulary.db
ADDED
Binary file (49.2 kB). View file
|
|