A way to grab the request IP from tornado?

Hi awesome people,

I tried to tinker with the Streamlit source code to get this to work but didn’t have any success so far so I was wondering if the Streamlit community already found a solution to this.

Is there a way to tap into the tornado web server from a Streamlit application and grab the connecting client IP address? (a.k.a. RequestHandler.request.remote_ip).

My current use case is to let people fill in a Streamlit form that should only be filled in once while active and instead of dealing with:
1: Let people enter their mail address
2: Set up a mail server
3: Send mail verification link to mail address
4: Make an endpoint in a different application(Flask/Bottle/FastAPI, cause Streamlit currently doesn’t handle different endpoints or REST calls yet) that accepts the verification token
5: Log/toggle verification in a DB

It would be an easy restriction(not bulletproof, but good enough for this form) to just log the request IP in a DB after the form has been submitted.

Seeing as there were already some discussions about requests and API calls in Streamlit, a feature like this could be used in the same way as the st.get_url() proposal.
st.get_request_ip() would seem logical.

Coincidentally I was looking into implementing captcha’s into this Streamlit app as well but having access to the request IP could also restrict automated form responses since the form won’t show if the IP has been logged.

Thanks in advance!