Automatization

Hi,
We are trying to deploy a Streamlit app via StreamlitShare that would stay updated with our latest data. For that purpose we would download data every x days, process it with our python code that would return a dataset/CSV. We our streamlit to stay updated with the latest data
We have tried some things but are quit lost at this point.
Does anyone have an idea?

Hello @DATAtourism, welcome to the community!

On this project I use Github Actions here to fetch data and process it in Python, and commit it to the repo every Sunday, which triggers a Streamlit Share redeploy with the latest data :). You could also upload it elsewhere, as long as you commit as in the end it’s the commit that refreshes the app.

Inspiration:

Hope this helps get you started
Fanilo

1 Like

Thank you :slight_smile:
We want to change the color of the sidebar, we have used all the codes we found on the forum but it doesn’t change. How can we do ? I would also like to know, if we can change the url or part of the url, when we deploy the app with streamlit share? thank you

Until custom theming is out, you can rely on the unsafe_allow_html hack to inject your own CSS snippets(do note that any version upgrade may break the CSS path!).
For sidebar there’s a linear gradient on the background-image to get rid of beforehand:

style.css
body {
    color: #fff;
    background-color: #4F8BF9;
}

section[data-testid="stSidebar"] > div {
    background-color: chartreuse;
    background-image: none;
}
app.py
import streamlit as st

def local_css(file_name):
    with open(file_name) as f:
        st.markdown('<style>{}</style>'.format(f.read()), unsafe_allow_html=True)

local_css("style.css")

st.title("Hello world")
st.sidebar.markdown("Hi")

The Streamlit team has this in their roadmap. Would you mind sharing some of your ideas for URL modification :slight_smile: ?

Thank you so much. Now, I want to know how to change the sidebar font color? in the style.css or in def local ?

Regarding the URL, I want to change “share.streamlit.io/datatourism/datatest/app_dt1.py” to “https://datatourism.py” for example, choose what we want to put.

THANK YOU :slight_smile: :raised_hands: :pray: