Skip to main content

2 posts tagged with "Compare"

View All Tags

Streamlit vs. MecSimCalc

Β· 6 min read
Weichen Qiu
MecSimCalc Co-founder

Banner

Streamlit and MecSimCalc both offer solutions to simplify app development and data visualization with Python. However, they cater to different user bases and provide unique features. In this article, we'll delve into a detailed comparison between Streamlit and MecSimCalc.

Overview​

Let's start with an overview of both platforms.

FeatureStreamlitMecSimCalc
WebsiteStreamlitMecSimCalc
Description"A faster way to build and share data apps. Streamlit turns data scripts into shareable web apps in minutes. All in pure Python. No front‑end experience required.""The simplest way to build and share computational tools. Create and share your Python web apps in minutes for free."
Target AudiencePython developers, e.g. data scientists and machine learning engineersNon-developers, e.g. engineers, consultants, educators, researchers, etc.
Required KnowledgePython, Terminal, GitHub, Markdown, Streamlit libraryPython
Ideal Use CaseData visualizationComputational simulation and calculation
CostFreeFree

Features Comparison​

Now, let's explore the specific features and functionalities of both Streamlit and MecSimCalc.

FeatureStreamlitMecSimCalc
Documentationdocs.streamlit.iodocs.mecsimcalc.com
Blogblog.streamlit.iodocs.mecsimcalc.com/blog
Discourse Forumstreamlit.io/communitycommunity.mecsimcalc.com
Custom Code SyntaxYes, requires custom streamlit functionsNo, works with plain Python
Resource Limits1 GB RAM, sleeps after 7 days of inactivity7 days, 16 vCPUs, 120 GB RAM, 200GB disk space
No Download RequiredβŒβœ…
Online EditorβŒβœ…
Monetize AppsβŒβœ…
Conditional Inputsβœ…βœ…
Dynamic Tablesβœ…βœ…
Interactivity & Animationsβœ…βŒ
Plottingβœ…βœ…
Mapsβœ…βœ…
Embeddableβœ…βœ…
Drag-and-drop interfaceβŒβœ…
Run in BackgroundβŒβœ…

The Workflow​

Next, we will briefly explore the workflow of both Streamlit and MecSimCalc, from creating an app to deploying it.

Streamlit​

Internally, Streamlit uses Tornado as its web server. Streamlit communicates with websockets, making it suitable for interactive real-time applications. [source]

Here is a simplified workflow for creating and deploying a basic Streamlit app:

Step 1: Download and start streamlit via the terminal:

# Prerequisite: download Python and pip, if not already installed
pip install streamlit
touch my_app.py
streamlit run my_app.py

After running streamlit run, a new tab will open on your browser with the app running at a localhost url. All the coding will be done locally on your computer and edits in my_app.py will automatically be reflected in the browser.

Step 2: Write the Streamlit code inside my_app.py. Refer to Streamlit docs for custom streamlit functions required to build the interface and layout.

# my_app.py

import streamlit as st

st.write("# a+b")

col1, col2, col3 = st.columns([6, 1, 6])
with col1:
a = st.number_input("a", value=12)
with col2:
st.write("# +")
with col3:
b = st.number_input("b", value=34)

sum = a + b
product = a * b

st.write("The sum of the two numbers is " + str(sum))
st.write("The product of the two numbers is " + str(product))

Step 3: The inputs, code, and outputs are all handled in the single Python file. The localhost webpage looks like this: Streamlit app

Step 4: Before deploying the app, a Github account is required and then create a new Github repository. Save the code to this repository by downloading and using the Github desktop app or using the terminal:

# Prerequisite: download Git, if not already installed
git add .
git commit -m "saving my_app.py"
git push

Step 5: Finally, to deploy the app, create a Streamlit Cloud account and fill out the Deploy an app form with the Github repository link. Once submitted, the app will build for a few minutes before becoming accessible at a streamlit url.

MecSimCalc​

Internally, MecSimCalc uses serverless functions to run Python functions, making it suitable for computational simulations and calculations, which may require more compute power and longer runtimes.

Here is a simplified workflow for creating and deploying a basic MecSimCalc app:

Step 1: Visit https://mecsimcalc.com/create and select one of the templates to create a new app. Create page Step 2: On the inputs step, use the drag-and-drop interface to add, position, and delete the inputs. Customize each input by clicking on it. Inputs step Edit inputs Step 3: On the code step, write Python code that uses the inputs to calculate the outputs. No need to learn new functions nor any installations. Use the toolbar on the right to install Python packages, debug the code, and list the input variables. Code step Step 4: On the outputs step, use the rich text editor to stylize the outputs section and embed the output variables generated from the code. Outputs step Step 5: Finally, to deploy the app, simply click on the Publish button at the bottom of the Preview step and the app will be accessible and searchable on MecSimCalc within a few seconds. Publish This is what the final app looks like: MecSimCalc app

Conclusion​

In the realm of Python-based app development and data visualization, Streamlit and MecSimCalc offer distinct yet invaluable solutions, each tailored to different user bases and varying levels of expertise. As uncovered in this comparison, Streamlit serves the needs of Python developers, providing a platform for swiftly creating interactive data applications. However, leveraging its functionalities demands a certain level of familiarity with custom Streamlit functions and the integration of terminal/GitHub for efficient deployment. Furthermore, Streamlit is ideal for data visualization and interactive tasks, but it lacks the computational power and runtime capabilities to handle more complex simulations and calculations, that MecSimCalc has.

On the other hand, MecSimCalc carves its niche by catering to non-technical users, providing an in-browser solution that doesn't necessitate altering existing Python code. Its user-friendly interface and simplicity in operation make it an attractive choice for individuals with less technical acumen. By eliminating the requirement for comprehensive technical know-how, MecSimCalc streamlines the app development process, offering a more accessible path for those less versed in the intricacies of coding and deployment processes.

The choice between Streamlit and MecSimCalc significantly hinges on the user's level of expertise and the specific project requirements. These tools epitomize the diverse spectrum of options available for Python-based app development, each serving distinct purposes and targeting particular user demographics. Whether one opts for the developer-oriented yet feature-rich Streamlit or the user-friendly, in-browser functionality of MecSimCalc, the decision ultimately revolves around the skill set and needs of the user, showcasing the versatility of available tools in the Python ecosystem.

Anvil vs. MecSimCalc

Β· 5 min read
Weichen Qiu
MecSimCalc Co-founder

Banner

In today's fast-paced digital world, the ability to develop web applications quickly and efficiently can make a significant difference for businesses and developers alike. Anvil and MecSimCalc are two tools that aim to simplify web app development, offering the power of Python without the complexity of traditional web development. In this article, we will compare Anvil and MecSimCalc across various dimensions to help you choose the one that best suits your needs.

Overview​

Before diving into the technical details, let's take a look at the basic information.

FeatureAnvilMecSimCalc
WebsiteAnvil WorksMecSimCalc
Description"Build web apps with nothing but Python. Build seriously powerful web apps with all the flexibility of Python. No web development experience required.""The simplest way to build and share computational tools. Create and share your Python web apps in minutes for free."
Target AudienceBusinessesNon-developers, e.g. engineers, consultants, educators, researchers, etc.
Required KnowledgePython, Anvil libraryPython
Ideal Use CaseFull-fledged business websites with a databaseComputational simulations and calculations
CostFreeFree

Features Comparison​

Now, let's dive into the specific features and functionalities of both Anvil and MecSimCalc.

FeatureAnvilMecSimCalc
Documentationanvil.works/docsdocs.mecsimcalc.com
Bloganvil.works/blogdocs.mecsimcalc.com/blog
Discourse Forumanvil.works/communitycommunity.mecsimcalc.com
Drag-and-drop interfaceβœ…βœ…
Cloud Deploymentβœ…βœ…
Self-Hostβœ…βœ…
Github Integrationβœ…βŒ
Built-in Databaseβœ… Postgres DB❌
Built-in External Integrationsβœ… Stripe, OAuth, Jupyter, Email, etc.❌
In-Browser Editorβœ… No intellisenseβœ…
Run in Backgroundβœ…βœ…
Custom Domainβœ…βŒ
App MarketplaceβŒβœ…

The Workflow​

Creating web applications should be a straightforward process. Let's explore how Anvil and MecSimCalc facilitate the app building and deploying process.

Anvil​

Anvil runs a web server that communicates with a database and other processes.

Step 1: Create a new app by selecting an Anvil template.

Create page

Step 2: On the inputs page, use the side menu on the right to configure each input and use drag-and-drop to add more inputs from the toolbox. The inputs are linked to the code by selecting the appropriate code function within each input's side menu.

Inputs page

New component

Step 3: On the code page, use custom Anvil functions to write Python code that executes commands, like interacting with databases, using the provided input values.

Code page

Step 4: Finally, to deploy the app, click on the Publish button and set the appropriate settings in the popup window.

Publish

Step 5: The app is now deployed and accessible at an Anvil url. Keep in mind that Anvil apps on the free tier come with a banner at the top.

Anvil app

MecSimCalc​

Internally, MecSimCalc uses serverless functions to run Python functions, making it suitable for computational simulations and calculations, which may require more compute power and longer runtimes.

Here is a simplified workflow for creating and deploying a basic MecSimCalc app:

Step 1: Visit https://mecsimcalc.com/create and select one of the templates to create a new app. Create page Step 2: On the inputs step, use the drag-and-drop interface to add, position, and delete the inputs. Customize each input by clicking on it. Inputs step Edit inputs Step 3: On the code step, write Python code that uses the inputs to calculate the outputs. No need to learn new functions nor any installations. Use the toolbar on the right to install Python packages, debug the code, and list the input variables. Code step Step 4: On the outputs step, use the rich text editor to stylize the outputs section and embed the output variables generated from the code. Outputs step Step 5: Finally, to deploy the app, simply click on the Publish button at the bottom of the Preview step and the app will be accessible and searchable on MecSimCalc within a few seconds. Publish This is what the final app looks like: MecSimCalc app

Conclusion​

Anvil and MecSimCalc present distinct approaches to simplifying web application development, harnessing the capabilities of Python without necessitating extensive programming expertise. Anvil, catering to comprehensive website creation, boasts an array of features, potentially introducing complexity, whereas MecSimCalc targets non-technical users, streamlining intricate computations.

MecSimCalc specifically excels in simplifying complex calculations using Python, offering a more straightforward learning curve due to its sequential layout and familiar Python code structure. In contrast, Anvil's robust feature set, while powerful for creating full-scale websites, may require a few hours for users to grasp the Anvil web layout and anvil code library.

Anvil suits businesses seeking database interaction within a website, while MecSimCalc serves as an optimal choice for non-developers aspiring to create simple web apps like calculators. Its strength lies in facilitating app development for non-technical users.

Ultimately, the selection between Anvil and MecSimCalc hinges on individual needs and the complexity of the intended web applications. Both tools leverage the capabilities of Python but cater to different audiences and offer distinct features.