Streamlit Local Storage Handler
Streamlit Local Storage Handler is a Streamlit component that allows you to interact with the local storage of the user's browser. You can set, get, remove, and clear items in the local storage using this component.
Installation
To install the component, you need to have npm and Node.js installed. Then, follow these steps:
-
Install the Python package:
pip install st-storage-handler
Usage
from st_storage_handler import st_storage_handler
Methods
-
Creation of Key, Value pairs in the local storage
st_storage_handler.set_item(set_keys: dict, widket_key: str)
set_keys: A dictionary of key, value pairs to be set in the local storage.widget_key: A unique key for the widget. -> needs to be unique for each widget (if you have multiple widgets using the same key, they will all be updated when one of them is updated)
-
Retrieving the value of a key from the local storage
st_storage_handler.get_item(key: str, widket_key: str)
key: The key of the value to be retrieved from the local storage.widget_key: A unique key for the widget. -> needs to be unique for each widget (if you have multiple widgets using the same key, they will all be updated when one of them is updated)
-
Removing a key from the local storage
st_storage_handler.remove_item(key: str, widket_key: str)
key: The key of the value to be removed from the local storage.widget_key: A unique key for the widget. -> needs to be unique for each widget (if you have multiple widgets using the same key, they will all be updated when one of them is updated)
-
Clearing the local storage
st_storage_handler.clear(widket_key: str)
widget_key: A unique key for the widget. -> needs to be unique for each widget (if you have multiple widgets using the same key, they will all be updated when one of them is updated)
Metadata
Release files for st-storage-handler 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| st_storage_handler-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / st_storage_handler-0.0.1-py3-none-any.whl
| Download URL | st_storage_handler-0.0.1-py3-none-any.whl |
|---|---|
| Size | 501.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dfd85e2433d7023ee4e7de1b8bd558e6407fd03d0485c4bde60c5a6e9a399640
|
|
BLAKE2b-256 checksum How to use checksums |
d83b3a10a5c57017f168e5c461a2c7069fe6f0a938b00bdc7c169bdcf7e60730
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|