IsaacKerson commited on
Commit
e153455
1 Parent(s): a2b8df7

set up mongo connection

Browse files
Files changed (2) hide show
  1. app.py +12 -3
  2. requirements.txt +2 -0
app.py CHANGED
@@ -1,4 +1,13 @@
1
  import streamlit as st
2
- st.title("This is an update to the app.")
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
+ import pymongo
3
+
4
+
5
+ cluster = "mongodb+srv://m001-student:test-run@sandbox.zqzg8.mongodb.net/sample_airbnb?retryWrites=true&w=majority"
6
+ client = pymongo.MongoClient(cluster, server_api=ServerApi('1'))
7
+ #db = client.test
8
+
9
+ st.title("With Pymongo")
10
+
11
+ #x = st.slider('Select a value')
12
+ #st.write(x, 'squared is', x * x)
13
+ st.write(client.list_database_names())
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ pymongo
2
+ dnspython