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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 010b3721208d1266190ca1263c16a55f001f224b47cf0ea12f7e3483a641c3aa |
|
MD5 | e79204d28cad8515f45996973d5170e5 |
|
BLAKE2b-256 | 8626feedaa979d019b86ed70223450f49b50f6df103ab493c853f474f09a2482 |
Hashes for streamlit_local_storage-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6733036c4210dc26f36a5d80c82e7518e0580a0db77f9097f0bdf1a15a2fa2fd |
|
MD5 | 587462dc5d76e3f6b83c9e8a783b09a1 |
|
BLAKE2b-256 | 32011489ef0f8803f62d22c45dfbf1567fcdd3e50e48e7930c7deed07e8d3884 |