Skip to content

Commit

Permalink
Force readonly mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbelgium authored Mar 5, 2025
1 parent a6d0c3f commit eac6ab6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/plotly_streamlit.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@

@st.cache_resource()
def get_connection(path: str):
return sqlite3.connect(path, check_same_thread=False)
uri = f"file:{path}?mode=ro&cache=shared"
return sqlite3.connect(uri, uri=True, check_same_thread=False)


def get_data(_conn: Connection):
Expand Down

0 comments on commit eac6ab6

Please sign in to comment.