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
streamlit-local-storage-0.0.4.tar.gz
(441.9 kB
view hashes)
Built Distribution
Close
Hashes for streamlit-local-storage-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 390b2f1c72850728adf01865c17582331154fb661b64742878163d8c09f3c5ed |
|
MD5 | 4113a03cc3ef6dd67b8070658a446124 |
|
BLAKE2b-256 | ba93a590fed86b3289937b574b39e9ca88482761bed6a76b42a0f81b65f78d6b |
Close
Hashes for streamlit_local_storage-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48351b1a27ed1a3ff4bd9d45c943f795dab28a786af427ca5e08d97389980cfd |
|
MD5 | 1b9f73d78fcd815ca62a93a71f9d7fe1 |
|
BLAKE2b-256 | 57e27a39de0df9573ff47bd0be55522f40fd7273115cf7f2ddbb532c81608a79 |