I am currently using Streamlit to develop a web application with Python. In my application, I make few HTTP POST requests using the requests library. Specifically, I use the following code to send a POST request:
While this code executes without issues, I am unable to inspect the details of these HTTP requests in the network tab of my browser’s developer tools. I would like to understand the process for viewing these requests.
Debugging Information:
Running Environment: The app is running locally.
Hosting Platform: N/A (app is not deployed yet).
GitHub Repository: :none
Error Message: There is no error message displayed; the issue is that the requests are not visible in the network tab of the developer tools.
Versions:
Streamlit version: 1.36.0
Python version: 3.9.13
Could you please provide guidance on how I can view and inspect these HTTP requests? Is there a specific configuration or method I need to use within Streamlit to ensure these requests are visible in the network tab?
Those requests are being executed by python, not by the website itself (i.e. not by html or javascript), so they will not be displayed in the developer tools at all.
The only exception I can think of is if you embedded javascript into your app, or ran your app via stlite so that it’s entirely running in the browser, and not running in python at all.
I am currently developing a web application using Streamlit and have some concerns regarding the privacy and security of the data processed within my application. Specifically, I am using Streamlit’s input fields to collect user credentials and storing authentication tokens in st.session_state.
Here is a snippet of the code I am using:
import streamlit as st
import requests
st.title("Login")
def login(email, password):
loginPayload = {
"email": email,
"password": password
}
response = requests.post(f"{urls.api_url}{PathType.LOGIN.value}", json=loginPayload)
if response.status_code == 200:
return response.json(), True
else:
return None, False
with st.form("login_form"):
email = st.text_input("Email")
password = st.text_input("Password", type="password")
login_button = st.form_submit_button("Login")
if login_button:
token, success = login(email, password)
if success:
st.session_state.token = token['token']
st.success("Login successful")
else:
st.error("Login failed. Please check your credentials.")
Is there any chance that Streamlit (or Snowflake, Inc.) has access to the information entered in these input fields or stored in st.session_state?
Does Streamlit collect or store any data entered or processed in my Streamlit application by default?
Are there any additional measures I should take to ensure that the data processed within my application remains private and secure?
I appreciate your assistance in clarifying these points to ensure that I am complying with best practices for data privacy and security in my application.
For 3, it really depends what you’re doing with that information, how you’re storing it, etc. For example, you should make sure that whatever service you’re sending the request.post to doesn’t leak the information.
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.