Solara

S

Solara

Discord for the Solara python package. NOT for the Roblox executor :)

Join

questions-issues

general

announcements

Llama2 Chatbot

I'll create a thread here with the source so it doesn't clutter the chat

Use_thread

Hello, I've been using a separate thread to run a long computation process in my application using solara.use_thread. The idea is to keep the UI responsive and prevent server disconnects. I've attached a simplified flow diagram of my setup. However, I'm experiencing inconsistent behavior. Sometimes the process runs perfectly for a long time, but at other times, it crashes almost immediately or after a short while....

For logged on users I want to give users

For logged on users. I want to give users the flexibility of saving the results (basically a nested dictionary with regular and reactive objects mixed) into their AWS S3 buckets. They will reload it later.

Well I am definitely on the right track

Well, I am definitely on the right track hahaha. This is exactly the approach I took.

another question i just want to combine

another question , i just want to combine cross filter with map (leafmap) however I couldn't make it work: filter, _set_filter = solara.use_cross_filter(id(df))
solara.CrossFilterSelect(df, "class") solara.CrossFilterSelect(df, "name")...

2 No if you put in a top level dict not

2) No, if you put in a top level dict (not reactive) in a module, every user sees the same dictionary. The only problem with that is that you cannot get an event when the data changes, but you could do a proxy. I can give some example code in a thread that doesn't work yet, but might get the idea across better. 4) Not yet, but coming! (see also the new thread)...

If I ve setup an app with multiple pages

If I've setup an app with multiple pages using Solara's routing, is there an easy way to redirect a user to a certain page? For example, say I'd want to show a popup and then, after some few seconds, redirect the user to the home page.

Thank you for your answer but next

Thank you for your answer, but next question, why display(button) from widget on solara component doesn' t appear on my codes: import solara import ipywidgets as widgets ...

would be very happy to be a guinnea pig

would be very happy to be a guinnea pig 😄

Which version of lab running pip install

Which version of lab? running !pip install will install it in the kernel environment, if the lab server is is in a different environment, it still not installed there if you're in the scenario of different environments for server and kernel.

Thanks how could I programatically set

Thanks ! how could I programatically set theme from Python side ?

it seems to be functional not sure I

it seems to be functional. not sure I understand the downside of my current approach. but fixing anyway

3 what s the best way to implement `push

3. what's the best way to implement push notification ? is it something like this ? and is it run as an OS thread or a greenlet in eventloop ? ``` @solara.component def Page(): push_notifications = solara.use_reactive([])...

2 when I create a module level reactive

2. when I create a module level reactive var like x = solara.reactive(None), is it application wide or session wide ? seems like application wide, how could I get a session wide var on Python side ?

couple of questions around session

couple of questions around session management: 1. I found Solara manages session via cookie which is good, could we figure out a standard way to expose session_id to application layer ? for me, my first thing on my web app is to set session id via localstorage and wait for the value before rendering anything, I think the Solara managed session is just perfect for my need to identify a session....

I m not sure what you mean but changing

I'm not exactly sure what you mean, but changing the value from the backend would look something like this: ``` import solara import ipyreact ...

hey solara team looking into state

hey solara team looking into state documentation. It seems solara.reactive is session based as in if i refresh it resets. Is there a way to have shared state between sessions (browser refresh, etc) without using a database? Is it using the cache storage?

hope to know when we will get this fixed

hope to know when we will get this fixed. I am developing some demo with Solara and don't want to see this when show the demo to the executives.

The timer thread is an infinte loop That

The timer thread is an infinte loop. That's the only loop I know of. And the timer isn't a problem when only using one second ticks to update the Markdown displayed time. The fifteen minute ticks cause no problem until they are used to trigger the component update. I don't touch the render function. I can show you more of the code @MaartenBreddels. Should I paste it here?