8000 GitHub - andfanilo/streamlit-lottie at 0da8f882f5b3ace8133c99051e21db06b43d5cdf
[go: up one dir, main page]

Skip to content

andfanilo/streamlit-lottie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Streamlit Lottie

Streamlit App

Integrate Lottie animations inside your Streamlit app!

Install

pip install streamlit-lottie

Usage

from streamlit_lottie import st_lottie

def load_lottieurl(url: str):
    r = requests.get(url)
    if r.status_code != 200:
        return None
    return r.json()

lottie_url = "https://assets5.lottiefiles.com/packages/lf20_V9t630.json"
lottie_json = load_lottieurl(lottie_url)
st_lottie(lottie_json)

Development

Install

  • JS side
cd frontend
npm install
  • Python side
conda create -n streamlit-echarts python=3.7
conda activate streamlit-echarts
pip install -e .

Run

Both webpack dev server and Streamlit need to run for development mode.

  • JS side
cd frontend
npm run start
  • Python side
streamlit run app.py

References

Credits Lottie files:

0