Solara

S

Solara

Join the community to ask questions about Solara and get answers from other members.

Join

questions-issues

general

announcements

any way to export solara app as an executable app?

It's not about deploying the app, but some method to make it an executable app. something simpler for the client other than installing python, libraries and source codes

How to access the user's microphone?

To be more specific, I want to use Solara as an interface for my program with Azure Speech ``` import azure.cognitiveservices.speech as speechsdk ...

use_exception

Can anyone provide a simple example of how to use the use_exception hook? The demonstration on the documentation page generates an infinite render loop when the test exception is generated and does not recover....

process results of a field change to another element level

I would like to trigger python code each time one of the input fields in a page is updated, the result of the python code should be shown in a message box at Page() level. https://py.cafe/rob.on.lists/solara-markdown-message-editor I know how to display a reactive variable in a field on Page(), when it is changed/set in another element, but I can't get my mind around triggering python statements. Should I propagate the on_value condition from the propagate() routine up to MarkDownEditor elements in Page()? How do you propagate conditions?...

Wish to have Select components within Row arranged side-by-side.

Hello, Currently I have a side bar to store my controls. In my main window, I have a map. Rather than having the controls in the sidebar, I would like to have the components in my control section side by side across the top. But row stills stacks components on top of each other:...

What are the limitations/restrictions of solara.DataFrame()?

My application has a beefed-up class of DataFrames, with several methods added, and solara.DataFrame dies when I want to display it: TypeError: <class 'main.MyFrame'> not supported import pandas as pd...

Gracefully exiting kernel when users closes UI page

How do you gracefully kill the current kernel when I close the UI web page? Currently, the kernel keeps running and I have to cntl-c to shut it down. From the documentation, it seems that I must shutdown the websocket. Please forgive my ignorance, but how does one go about doing that within solara? Or am I barking up the wrong tree?...

Send components to another browser tab or window

I have an application composed of 100 BIG dataframes. I can navigate through the dfs in one tab/window. The users click on a row in a df to do a simulation, the result of the simulation is another df. I see how we can do this with solara.Dataframe. We want the resulting df presented in a separate browser tab (or a separate window), because the user wants to see the results of several simulations side by side (not in solara.Tabs or grid). ...

Admin Portal examples and templates

Hi Team, I am new to Solara and trying to build an Admin Portal based on Flask REST API. Are there any Solara examples and templates available which I could re-use and start from? ...

how do I build a solara app thats on a website?

I'm new to solara. I have a google collab file that takes in input and prints out output. I want a way to put this on a website somehow so when I go to a link it'll just let me type and press a button. Is this doable?...

Best practices for state management and encapsulation

I am trying to figure out how to handle application state in a pythonic and scalable way. I don't like having global (reactive) variables, and I would like to encapsulate as much logic as possible into the components to separate concerns. 1. Is there any way for components to access reactives (solara.reactive or solara.use_state) on other components? 2. Can components be classes, or in some other way carry methods / properties / reactives in order to encapsulate behaviour? (eg general form of question above) 3. Are there examples/docs/instructions for how to create complex application states to be shared between components? I'm envisaging the application state as a big, nested dict that contains all state. 4. Is component state better managed by having a module per component that defines one or more reactives and their manipulation functions together with the component itself, so that you would import my_component and then use my_component.MyComponent, my_component.data and my_component.update_data(new_data)?...

http requests to backend API

Hi, Is there any libarary available in Solara to create HTTP requests to my Flask backend? What is your recommendation?...

InputDateRange question

UI/solara newbie question Greetings. I am trying to use the solara InputDateRange component but I am having a problem. I set the default values w/ use_reactive(), I have InputDateRange component to alter/update the date range, and a separate part that actually uses the values. My problem is that when I make a change of dates, my app fails before I can set the end date - i.e. only the first date gets set. Below is a toy version of my code: import solara...

ipyaggrid styling

Hi everyone, I have tried to override Balham dark theme specifically for ipyaggrid component I’m using. For example highlight a row, say, green, if a column value == to a specific value. Also more general styling overrides. I have tried using a css string variable and setting this to style param when implementing the grid. But not much luck at all. Thank you!

Ipyaggrid Grid element - Get selected row if click on it

Hello! Is there any way to add to Grid element on Ipyaggdrid the click interaction with the grid.observe?...

why use_routes can't work in jupyterlab?

I am debugging multipage, and tried to run the same code in jupyterlab, and it raised an error.... and yes I can't find any code from use_routes... how does this work when I run in prompt line mode?
No description

Need a button with a label that changes with each click

I am not sure if this is a solara question, or a vue issue. I need a button that switches between 2 values (OFF/ON) and also shows the value (text) in the button label field. I think I have a solution in https://py.cafe/rob.on.lists/solara-interactive-toggles However... some of the clicks do make the switch change value, some of the clicks are seemingly ignored. Also, I need more than one button, and enabling the 2nd button makes me wonder if the reactive id is passed by name, or by reference. Because sometimes when I press the right button, the left value changes....

Using plotly.express to create scatterplot_mapbox, map displays but animation does not work

I am creating a map with scatterplot_mapbox, I can create a map with my desired points plotted. However, animation does not work (buttons appear but do not function). I have run the exact same code in a jupyter notebook and the animation works. Any tips on getting the animation working? Code: fig = px.scatter_mapbox(plot_data, lat='lat', lon='lon', #z='Magnitude', center=dict(lat=start_lat, lon=start_lon), zoom=1,...

automatic reload not working (new user) (fixed)

I have just installed solara on linux mint 20.3 (based on ubuntu 20.04). I have a sol.py on local directory (a copy of apps/tutorial-streamlit.py) and started solara run sol.py in a terminal window as suggested in the tutorial. My firefox opens automatically and I see the first web page. Great. Success at the first attempt. I modify the file (locally) and save. The browser window is not refreshed, I see no message in the terminal window. I check ls -l and the time stamp of sol.py was changed....
Next