Streamlit component that allows you to do manage local storage
Project description
Streamlit local storage
This repo is to help streamlt users manage data in a browser's local storage.
pip install streamlit-local-storage
from streamlit_local_storage import LocalStorage
localS = LocalStorage()
store an array to local storage
localStorageArray = [ {"key":"Games", "toStore":[{"name":"Basically does this work"}]}, {"key":"Winners", "toStore":[{"name":"Basically does this work Though"}]} ] localS.setList(localStorageArray)
store individual items from local storage
itemKey = "camera" itemValue = "Tarah" localS.set(itemKey, itemValue)
get list of items from local storage
data_ = [{"key":"camera"}, {"key":"JamesLook"}] saved_ = localS.getList(data_) st.write(saved_)
get all items saved on local storage
saved_individual = localS.getAll() st.write(saved_individual)
delete item and item list from local storage
saved_individual = localS.deleteList([{"key": "ThomasKing"}, {"key":"Somethingelse"}]) localS.deleteItem('Tony')
delete all
localS.deleteAll()
get all
localS.getAll()
Remember to refresh browser if it does not pop up instantly.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for streamlit-local-storage-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12dfb9fa6b33503590cc9a1a05aa9e4785bce388dd8a49a37a0230d33fcf064a |
|
MD5 | 798cdd544f2121d98578f2825f5d28c4 |
|
BLAKE2b-256 | 655b782a25458d01e6059f1ea6bff11f283657b14ba97ac7cda992e804f1d77b |
Hashes for streamlit_local_storage-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65435e123804dc645ada4022c845bcb6dc1988b95737c1e1b402a16d45323117 |
|
MD5 | 8c5ce5bfe999bc246508fadd113069f8 |
|
BLAKE2b-256 | d09a5d33d8cf654276301e9d76f7bb3a1a794a22d5b25934e6b0ceb4a7da957c |