Skip to content

sfc-gh-cserrano/sis-mermaid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SiSMermaid

Loads Mermaid.js into Streamlit-in-Snowflake for easy diagrams.


Requirements:

  • Upload the provided mermaid.min.js and SiSMermaid.py files into the Snowflake Stage where your Streamlit-in-Snowflake app is hosted.
  • Adjust the relative path if needed during class initialization (optional).

Usage:

Import and use as follows:

from SiSMermaid import SiSMermaid

mmd=SiSMermaid()
mermaid_code = """
 flowchart LR;
 a-->b
 b-->c
 a-->d
 """
mmd.sis_mermaid(mermaid_source=mermaid_code,
               scrolling = True, #Optional - Defaults to True
               height = 900 #Optional - Defaults to 900
               )

To specify a new path for the mermaid.js file in your application stage, update the mermaid_js_file attribute for the SiSMermaid class.

mmd=SiSMermaid(mermaid_js_file ='yourpath/mermaid.min.js')

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages