Test
To upload files, please first save the app
import streamlit as st
import pandas as pd
from sqlalchemy import create_engine
from sqlalchemy.orm import Session, declarative_base
Base = declarative_base()
class TestData(Base):
__tablename__ = 'test_data'
id = Column(Integer, primary_key=True)
value = Column(String)
engine = create_engine('sqlite:///mydb.sqlite')
Base.metadata.create_all(bind=engine)
st.title('Test App')
with Session(engine) as session:
test_data = TestData(value='Hello, World!')
session.add(test_data)
session.commit()
st.write('Data added to the database!')
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?