Skip to main content

Handles localstorage with Streamlit.

Project description

streamlit-localstorage-bulk

PyPI version Build Status

Handles localstorage with Streamlit.

Significant performance improvements can be expected due to batch javascript execution.

Support python3 only.

Examples

import streamlit as st
from streamlit_localstorage_bulk import StreamlitLocalstorageBulk


def main():
    sl = StreamlitLocalstorageBulk(
        prefix="st_localstorage_",
    )
    v = sl.get_items(keys=["ability", "goals", "a"])
    st.write(v)

    # update or create
    if st.button("setitem"):
        sl.setitems(data={"a": "A"})

    # delete
    if st.button("delitem"):
        sl.delitems(keys=["a"])


if __name__ == "__main__":
    main()

Installation

pip install streamlit-localstorage-bulk

CI

install test package

$ ./scripts/ci.sh install

test

$ ./scripts/ci.sh run-test

flake8 and black and pytest.

release pypi

$ ./scripts/ci.sh release

git tag and pypi release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit_localstorage_bulk-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file streamlit_localstorage_bulk-0.1.0.tar.gz.

File metadata

File hashes

Hashes for streamlit_localstorage_bulk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 48b12fe5549bb05681e828fa51dc0d339b26a0b666291aa9ecd105a51d557d67
MD5 557f66c5deafb758382a4897cd5ff0d4
BLAKE2b-256 f10b324246c79973fb5aab28f4da860e6cfb616e9f78e4fa0b1373dcd5d8f762

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page