๐ Explore All My Excel Solutions: https://pythonandvba.com/solutions
๐๐๐ฆ๐๐ฅ๐๐ฃ๐ง๐๐ข๐ก
โโโโโโโโโโโโโโโโโโโโโโโโโโ
Learn how to use Lottie Files in Streamlit! Animations make our web app more engaging and fun, and Lottie Files are the easiest way to do it! In this tutorial, I'll show you exactly how to do it.
๐ ๐ฅ๐๐ฆ๐ข๐จ๐ฅ๐๐๐ฆ:
โบ Lottie Files: https://lottiefiles.com/
โบ GitHub Lottie Files: https://github.com/andfanilo/streamlit-lottie
๐ ๐ฆ๐๐ ๐ฃ๐๐ ๐๐ข๐๐:
โบ GistHub: https://gist.github.com/Sven-Bo/31d98f80b5fed1d3f53cf98e5b61e7c9
import json
import requests # pip install requests
import streamlit as st # pip install streamlit
from streamlit_lottie import st_lottie # pip install streamlit-lottie
# GitHub: https://github.com/andfanilo/streamlit-lottie
# Lottie Files: https://lottiefiles.com/
def load_lottiefile(filepath: str):
with open(filepath, "r") as f:
return json.load(f)
def load_lottieurl(url: str):
r = requests.get(url)
if r.status_code != 200:
return None
return r.json()
lottie_coding = load_lottiefile("lottiefile.json") # replace link to local lottie file
lottie_hello = load_lottieurl("https://assets9.lottiefiles.com/packages/lf20_M9p23l.json")
st_lottie(
lottie_hello,
speed=1,
reverse=False,
loop=True,
quality="low", # medium ; high
renderer="svg", # canvas
height=None,
width=None,
key=None,
)
๐ง๐ข๐ข๐๐ฆ ๐๐ก๐ ๐ฅ๐๐ฆ๐ข๐จ๐ฅ๐๐๐ฆ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ใ๐๐ฅ๐๐ใExcel Add-in (๐ ๐๐ง๐ผ๐ผ๐น๐๐ฒ๐น๐): https://pythonandvba.com/mytoolbelt
๐ Dashboard Excel Add-In (๐๐ฟ๐ฎ๐ณ๐น๐): https://pythonandvba.com/grafly
๐จ Cartoon Charts Excel Add-In (๐๐๐๐ฒ๐ฃ๐น๐ผ๐๐): https://pythonandvba.com/cuteplots
๐คช Fun Emoji Excel Add-In (๐๐บ๐ผ๐ท๐ถ๐ณ๐): https://pythonandvba.com/emojify
๐ Excel Templates: https://pythonandvba.com/go/excel-templates
๐ My Courses: https://pythonandvba.com/go/courses
๐ Books, Tools, and More: https://pythonandvba.com/resources
๐๐ข๐ก๐ก๐๐๐ง ๐ช๐๐ง๐ ๐ ๐
โโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ LinkedIn: https://www.linkedin.com/in/sven-bosau/
๐ธ Instagram: https://instagram.com/codingisfun_official
๐ป GitHub: https://github.com/Sven-Bo
๐ฌ Discord: https://pythonandvba.com/discord
๐ฌ Contact: https://pythonandvba.com/contact
โ ๐๐๐ ๐บ๐ฒ ๐ฎ ๐ฐ๐ผ๐ณ๐ณ๐ฒ๐ฒ?
If you want to support this channel, you can buy me a coffee here: https://pythonandvba.com/coffee-donation