Hi everyone, first message here, sorry in advance if you find my question trivial.
I have been developing a local streamlit app for our data analysis in my team. I am looking to see if it is possible to deploy this app. Problem is that I need to access the path of where my datas sit (on a research server).
Can I deploy my app if my paths are defined locally in the computer that deploy the app? Or a device that is not connected to the server won’t see the data ?
I’m quite sure it doesn’t work that way but it would be super cool if the computer deploying the app could host the “run”, and other devices using the link just interacting with the interface.
When you define paths in your Streamlit app, it’s relative to the computer the app is being served from, not relative to the user’s computer. Which means, if where you deploy from has the same paths as you’re trying to access, then it would work.
However, if you’re doing something like in Windows where you map D:/ to a network drive, then try to host the app somewhere else, it won’t necessarily have the same drive mapping. In that case, you would need to specify the exact server address.
Thank you for the answer! I’m working on it right now. I think my solution should be ssh to the serveur of the data. Will I be able to put the ssh output in my filePath str variable ?
Edit: It is indeed a D:/ filePath and it makes problems even if we all have the same mapping…
It’s hard to say if that’s the right solution, but what I can say is that how you access the data from Python ends up being a separate issue than using Streamlit. Meaning, if you have to access a remote server, whether you can do it using ssh, with an API call, or something else, that has to happen before you can use the data in Streamlit.
Yea, I though my question might end up to how I read the data… Because I coded the data read like a nooby windows style, it scales bad deploying to the app. I’m going to see if it’s not too much effort. Thanks
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.