Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: streamlit add new component: filter renderer #415

Merged
merged 1 commit into from Feb 2, 2024

Conversation

longxiaofei
Copy link
Member

  1. use StreamlitRenderer(recommend)
import streamlit as st
from pygwalker.api.streamlit import StreamlitRenderer

@st.cache_resource
def get_pyg_renderer() -> "StreamlitRenderer":
    df = pd.read_csv("xxxx")
    # When you need to publish your application, you need set `debug=False`,prevent other users to write your config file.
    return StreamlitRenderer(df, spec="xxx")

renderer = get_pyg_renderer()

renderer.render_filter_renderer()
  1. use get_streamlit_html
from streamlit.components.v1 import html
from pygwalker.api.streamlit import get_streamlit_html

html(get_streamlit_html(pd.DataFrame(), mode="filter_renderer"), height=1000)

image

@longxiaofei longxiaofei merged commit 90bfcc6 into Kanaries:main Feb 2, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant