SQL Database on Github is NOT Saving

i deployed a streamlit app that contains a login form and whenever i create a user it saves the credentials to a .db file that is also hosted on github, then i’ll be able to login and start using the app.
But the issue is when i download the .db file from github to see the user that i created, it’s empty!!!

how can i fix this?

Probably you are not saving the credentials to the db file that is hosted in github, but in a copy that is hosted in streamlit cloud.

Makes sense, but how do i fix that?

import sqlite3

sql=sqlite3.connect(‘g3l.db’, check_same_thread=False)
sql_cursor=sql.cursor()

im using this to connect to the .db file and this file is in the main directory… on localhost it works perfectly fine.

P.S. Once i reboot the app the credentials won’t work and i have to create a user a second time

For the database to survive across application reboots you need to host the database outside of streamlit cloud.