Home > Mobile >  How to open atoti link in streamlit application with python?
How to open atoti link in streamlit application with python?

Time:09-24

I'm trying to run atoti link in streamlit application where i want to create some plots with atoti. I tried the below code but it's showing something else in place of the link.

new = pd.DataFrame()
new['Link'] = [session.link()]
st.dataframe(new)
st.write(new.to_html(escape=False, index=False), unsafe_allow_html=True)

The output is

     Link
    
 0   Link(_path='', _session=<atoti.session.Session object at 0x000002B700293FA0>)

Followed by :

Link

Link(_path='', _session=)

The expected link is http://localhost:53533

Can anyone help me with this?

CodePudding user response:

As documented here, Session.link() is only available in JupyterLab.

You could use f"http://localhost:{session.port}".

It's also possible to always use the same port.

  • Related