Dolo is something I put together over a weekend or two. Its a way to create web-based dashboards by writing a simple python script. The programming model is declarative and very similar to that of React. The API is pretty much a copy of streamlit's, but feature set is smaller and implementation is simpler.
I was blown away by streamlit's design and simplicity (and valuation) when I first used it, so decided to hack together a smaller working copy. Compared to streamlit, dolo only has a handful of components, and is more of a toy rather than a polished, production-ready thing.
- Call
dolo.writeto render markup dolo.button(...)creates a button and returns the state of the button (True or False)
dolo.dropdown(...)creates a dropdown and returns the selected option as a string
dolo.filter(...)creates a filter and returns the active filter as a stringdolo.plot(...)plots a matplotlib figure
- You can cache the outputs of expensive functions using the
dolo.cachedecorator - Put the code in
lit.pyand useflask runto run the app
- The output of the script is used to generate the markup
- For every incoming request dolo re-runs the script with the updated component state and re-renders the webpage based on the script's output.
- The state is stored in a python dictionary.
- All rendering is done server-side, which means even a button press refreshes the entire page. This is different from streamlit which is more of an SPA and changes are streamed over a websocket.
- state dictionary isn't thread-safe
- UI breaks if a state update happens while the page is refreshing
- using
matplotlib.pltisn't recommended in a multi-threaded environment