Skip to main content

edit and view json

Project description

streamlit-editjson

A Streamlit component to view and edit JSON with a user-friendly UI.

Installation

pip install streamlit-editjson

Usage

import streamlit as st
from streamlit_editjson import editjson

value = editjson(
    filepath="test.json",
    key_editable=False,   # default
    value_editable=True,  # default
)

st.write(value)  # Python dict

API

editjson(filepath, key_editable=False, value_editable=True, key=None) -> dict

  • filepath: path to a JSON file.
  • key_editable: allow editing JSON keys.
  • value_editable: allow editing JSON values.
  • key: optional Streamlit component key.

The component returns the edited JSON object as a Python dict.

Testing

Python unit tests

Run:

python -m unittest discover -s tests -p "test_*.py"

Running locally

Run:

python -m streamlit run src/streamlit_editjson/__init__.py --server.port 8501

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_editjson-1.0.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_editjson-1.0.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_editjson-1.0.0.tar.gz.

File metadata

  • Download URL: streamlit_editjson-1.0.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for streamlit_editjson-1.0.0.tar.gz
Algorithm Hash digest
SHA256 90cea39b38562f6974b3986aeba08ca84dd41c9e9b1c04834a943eb34e18b022
MD5 06727a5aca97a44e93b2e6ed9476dd86
BLAKE2b-256 cc9ea09d19fbf025af5cad551283c7835a26bd80adc504c0dd6f35443fc7e992

See more details on using hashes here.

Provenance

The following attestation bundles were made for streamlit_editjson-1.0.0.tar.gz:

Publisher: cd.yml on Thomasssb1/streamlit-editjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file streamlit_editjson-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_editjson-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3552fb892606a63881dc5006e32e26b76fd1349fefeff25c4a8ca9d1324d291
MD5 2c7e5ab55e3066f379cd768a193c9c95
BLAKE2b-256 036685dd20f673f257f888453d73c886b3928593bc1e4d313b36421a145c1aed

See more details on using hashes here.

Provenance

The following attestation bundles were made for streamlit_editjson-1.0.0-py3-none-any.whl:

Publisher: cd.yml on Thomasssb1/streamlit-editjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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