Hello everyone. The new editable grid in streamlit looks and feels amazing and I love the fact that it is possible to eve copy paste from Exel.
The question: can multiple users input into the same grid at the same time?
KR
Christoffer
Hello everyone. The new editable grid in streamlit looks and feels amazing and I love the fact that it is possible to eve copy paste from Exel.
The question: can multiple users input into the same grid at the same time?
KR
Christoffer
It’s fundamentally different than that. Streamlit creates a separate session state for each user. Even opening the app in different tabs creates different session states. So if you have multiple users connected to your app, they are each going to have their own session state and their own instance of any data editor you have on a page; they won’t see what others are doing. It’s up to you to commit any change a user makes to some source and then to check for and update from that source as appropriate in your implementation.
Hello mathcatsand. Thank you, much appreciated. I suppose the important thing is that 2 (or more) users can ammend numbers in data grid simultaneously. Just FYI, the data grid writes back to a CSV file whenever a number is changed. So I suppose that even though both users are working in their separate sessions, they can actually alter the same csv vis their inputs in the editable grid.
KR
Christoffer
The critical thing will be how you handle that reading/writing to the CSV file. If two users load up the page while the CSV file is in some initial state and the first user changes a cell, then the second user won’t see that update until their page updates/reloads somehow. If the second user goes in to change the same cell, then without some kind of change detection, the first user’s edit would be overwritten without being seen by the second user. Alternatively, if the second user changes a different cell, then the first user’s edit may be reverted. It all depends on the implementation for reading/writing.
Hi mathcatsand, I tried the tool with a coleague - we were doing changes at the same time and it worked as expected. Each user will definitely have their own discrete customers (and thus rows) to forecast so they wouldn’t have any reason to edit exactly the same rows/cells. It can of course happen by mistake but they will have to be a bit careful I suppose
KR
Christoffer