Custom component for viewing TOON data in Streamlit
Reason this release was yanked:
not ready
Project description
Streamlit TOON Viewer
A custom Streamlit component for viewing TOON (Tree Object Oriented Notation) data in an interactive, collapsible tree view.
Requirements
- Python >= 3.12
- Streamlit >= 1.51.0
Installation
Install the package using pip:
pip install streamlit-toon
Usage
Basic Usage
import streamlit as st
from streamlit_toon import StreamlitTOONViewer
# Create a viewer instance
viewer = StreamlitTOONViewer()
# Display TOON data from a string
toon_data = """
root:
child1: value1
child2: value2
"""
viewer.display_toon(toon_data)
Display TOON Data from a File
import streamlit as st
from streamlit_toon import StreamlitTOONViewer
viewer = StreamlitTOONViewer()
# Pass a file path directly
viewer.display_toon("path/to/your/toon_file.toon")
Custom Height and Key
import streamlit as st
from streamlit_toon import StreamlitTOONViewer
viewer = StreamlitTOONViewer()
# Customize the viewer height and add a unique key
viewer.display_toon(
data="your_toon_data_here",
height=600,
key="my_toon_viewer"
)
API Reference
StreamlitTOONViewer()
Creates a new TOON viewer instance.
display_toon(data, height=400, key=None)
Display TOON data in an interactive tree view.
Parameters:
data(str): TOON text as a string, or file path to a TOON fileheight(int, optional): Height of the component in pixels (default: 400)key(str, optional): Unique key for the component
Returns:
- Component return value
License
[Add your license here]
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamlit_toon-0.1.0.tar.gz.
File metadata
- Download URL: streamlit_toon-0.1.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa8f29894a0b08eefa85b83e7e73f9b749ef4fe08b547e3a62564608ce85c2b3
|
|
| MD5 |
ca0aceb36572e4b24b9d752889d1dc3b
|
|
| BLAKE2b-256 |
02d18511e3043ccc5ba925949955d7865beb4f9e4f6d3c36caba04f16ca06bcf
|
File details
Details for the file streamlit_toon-0.1.0-py3-none-any.whl.
File metadata
- Download URL: streamlit_toon-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cf243627230f5925f3ffc953118c4341918108125419e8f0b92df8bfb0baecc
|
|
| MD5 |
a38500201c519ffe6f641fd969168cff
|
|
| BLAKE2b-256 |
ffe5b18b9286fe35656d1223f59ee89497835006df2a985f40b640997fa16768
|