thursday / app.py
Ankush05's picture
Update app.py
33fa8fe
raw
history blame
961 Bytes
import streamlit as st
# from streamlit_option_menu import option_menu
# import os
import pandas as pd
# from pymongo.mongo_client import MongoClient
# from dotenv import load_dotenv
# from pymongo.server_api import ServerApi
# load_dotenv()
# uri = os.environ["MONGO_CONNECTION_STRING"]
# # Create a new client and connect to the server
# client = MongoClient(uri, ssl=False, server_api=ServerApi('1'), tls=False)
# db = client["myapp"]
# col = db["users"]
# newuser = {
# "username": "John",
# "password": "sdgsg"
# }
# col.insert_one(newuser)
# print("done!")
# # Send a ping to confirm a successful connection
# try:
# client.admin.command('ping')
# print("Pinged your deployment. You successfully connected to MongoDB!")
# except Exception as e:
# print(e)
# option_menu(None, ["Login", "SignUp"], orientation="horizontal")
with open("data.json")as f:
data = json.load(f)
df = pd.Dataframe(data["reminders"])
df