GithubHelp home page GithubHelp logo

streamlit-debug's Introduction

streamlit-debug

A handy tool for streamlit app debugging. Example: https://stdebug.streamlit.app/

Usage:

  1. Download st_debug.py and debug.css
  2. Import module
import st_debug as d
  1. Load css
def local_css(file_name):
    with open(file_name) as f:
        st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)

local_css("debug.css")
  1. At the bottom of your code make additional div:
if "debug_string" in st.session_state:
    st.markdown(
        f'<div class="debug">{ st.session_state["debug_string"]}</div>',
        unsafe_allow_html=True,
    )
  1. Write debugging commands
a = np.matrix("1 2; 3 4")
d.debug("this presents state of the matrix " + str(a))

Changelog:

14.01.2023

  • css update, new better visuals

streamlit-debug's People

Contributors

tomjohnh avatar

Stargazers

 avatar Jesper Vang avatar Nikolai Riabykh avatar  avatar Zachary Blackwood avatar Zachary Blackwood avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.