A couple of months back, I talked about Taipy, an open-source full-stack data application builder using Python alone (no need to learn JavaScript, CSS, or HTML) that I have been using for over 10 months now.
It resonated so well with the readers that it is currently the 2nd best issue of this newsletter (off 500+ issues published so far).
Read it here in case you missed it or you are new here: Taipy newsletter issue.
Back then, we talked about Taipy 3.0.
But recently, Taipy 3.1 was released with many upgrades, so I thought it’d be cool to talk about them.
Let’s begin!
High-level overview of Taipy
Feel free to skip this part if you are familiar with Taipy.
As mentioned above, Taipy is an open-source data application builder.
You can think of Taipy as a more robust and richer version of Streamlit, which is capable of building:
prototypes (like Streamlit)
project pilots and full-blown data applications (quite difficult with Streamlit)
The coolest and most practical feature of Taipy is its low-code Python syntax, which provides the entire front-end and optimized backend capabilities without any special expertise.
A programmer has to take care of just two things:
A string in markdown format: All visual elements are specified in this markdown string. These may include text fields, buttons, sliders, file selectors, or charts.
In Taipy, visual elements follow this syntax:
Note: It is not necessary to use Markdown syntax. We can code Taipy like Streamlit using a Python API.
A Taipy GUI object: Next, we have the GUI object, which renders elements from the markdown string and displays them on the web app.
Done!
With low code, we get the following web app:
To learn more details about:
Taipy vs. Streamlit
How to build an app with Taipy in the earlier issue
So I would highly recommend reading that issue: Taipy newsletter issue.
What’s inside Taipy 3.1?
While there are many updates in Taipy 3.1, I loved two of them specifically:
#1) Third-party component integration
Visual elements are the key components of any data application:
One thing we typically notice with most application builders is that they have limited support for custom third-party library integrations.
In other words, the programmer is mainly limited to the visual elements it provides and the third-party integrations it supports.
However, these integrations are pretty crucial at times, like:
What if the library inherently supports Plotly for data visualization, but we want to use Folium, Altair, Bokeh, or Matplotlib?
What if we want to show elements like videos, external web pages, etc.?
What if we want to create custom interactions (or animations) not supported by the library’s built-in components?
Taipy introduced custom third-party component integration in the latest release.
This means that now it’s possible to visualize any HTML or Python object with Taipy.
For simplicity, let’s say we want to display a Pandas DataFrame object in the app.
Note: Pandas DataFrame are inherently supported by Taipy. So what I am about to show you is not the ideal way to display them. My intention here is to keep things simple for better understanding.
There are just three simple steps:
Write a method to create an HTML version of the object to be displayed. Pandas already provides the
df.to_html()
method so we can use it here:If, however, an object does not have such a method, you can
tempfile
library.Store the object as an HTML file, then load it back and return it.
Register the above method so that Taipy GUI knows which method to invoke when it encounters an object of
pd.DataFrame
type:
We are almost done.
Finally, embed the DataFrame object using the following the
part
GUI component of Taipy:
Done!
Running the app, Taipy displays the Pandas DataFrame as expected:
Just look at how much code we wrote here; it’s just 11 lines, and we have a custom integration ready:
We can replicate the same idea on any HTML or Python object of our choice.
For instance, I found this demo where they displayed Folium maps in Taipy apps using the procedure discussed above:
Isn’t that cool?
#2) Taipy Telemetry
As mentioned above, it’s possible to build full-blown data applications with Taipy — which an end user can interact with.
Thus, regular monitoring and fixing bottlenecks (if any) is imperative to maintain an optimal user experience.
Taipy Telemetry does this.
It provides consistent insights into the app’s performance and depicts many health indicators, ensuring that potential issues can be identified way before they escalate.
Currently, the way it works is that Taipy produces metrics and logs about the jobs running in your application, which can then be monitored in tools like Grafana, Azure Monitor, etc.
A sample demo integration with Grafana is shown below:
The left chart depicts the number of jobs created — a functional metric.
The right chart depicts the number of messages exchanged between different machines — an operational metric.
Other than the above two updates:
Taipy 3.1 also rolled out support for distributed computing, with which computational tasks can be spread across multiple machines. More on this in a separate issue in the future.
Taipy 3.1 is now compatible with Python 3.12.
You can find more updates in the Taipy 3.1 release notes.
Summing up
Taipy has witnessed exponential growth over the last couple of months or so, which shows that more and more programmers are adopting it and finding it useful.
It has also trended on GitHub multiple times.
One major rationale behind Taipy’s adoption is the latency difference, which is pretty noticeable in practical apps when someone uses popular solutions like Streamlit, as depicted below:
They are releasing new updates almost every week now, so do give them a star on GitHub to support their work: Taipy GitHub.
I love Taipy’s mission of supporting data scientists and machine learning engineers in building full-stack apps themselves while Taipy takes care of all backend optimizations.
They are solving a big problem with existing tools, and I’m eager to see how they continue!
Get started with:
🙌 A big thanks to the Taipy team, who very kindly partnered with me on this newsletter issue.
👉 Over to you: What problems will you use Taipy for?
Thanks for reading!
Is it possible to use a fastapi server instead of Flask server?
If it must be Flask, can Google App Engine be used?
Nice find! Definitely worth checking it out!