Skip to main content

Command Palette

Search for a command to run...

Turn Scripts into Services: Why Network Automation needs a Web User Interface ?

Using Streamlit to Make Automation Accessible for every Team

Published
7 min read
Turn Scripts into Services: Why Network Automation needs a Web User Interface ?

Network automation has transformed how modern infrastructure teams operate. Scripts that once took hours of manual work — configuring devices, pulling inventory, validating compliance — now execute in seconds. But there is a quite, persistent problem that undermines the full potential of these scripts: only the person who wrote them can use them.

This is the automation accessibility gap. A skilled network engineer writes a powerful Python script to query BGP neighbors, generate config diffs, or push bulk ACL changes. The script works beautifully — in their terminal, on their machine, with their environment variables set correctly. But the moment that engineer is unavailable, the capability disappears. Colleagues cannot run it. Managers cannot trigger it. The NOC team, the helpdesk, and even other engineers are locked out

"The best automation script is useless if only one person can run it."

The solution is not to simplify the scripts — it is to wrap them in an interface that makes them universally accessible. Web frameworks like Streamlit provide this capability, bridging the gap between powerful automation logic and the teams that need to use it every day.

The Challenge of Terminal-Only Automation

Before exploring the solution, it's important to understand why terminal-based automation struggles to scale across teams.

Expertise Dependency

Running a Python script involves understanding how to use a terminal, navigate directories, manage virtual environments, install dependencies, and set the correct flags and arguments. While network engineers find this routine, it poses a significant barrier for NOC analysts, security auditors, or project managers needing a one-time report. When automation is confined to the terminal, it centralizes power among a few and creates bottlenecks.

Fragile Environments

Scripts that run perfectly in one engineer's environment often fail in another's due to different Python versions, missing libraries, conflicting dependencies, or mismatched environment variables. Reproducing the right execution environment is a technical skill unto itself, and it consumes time that teams do not have during incidents or operational windows.

Auditability Challenges

When multiple engineers share scripts over email or shared drives, there is no audit trail. Who ran the script? Against which devices? With what parameters? What was the output? This opacity creates compliance risks, troubleshooting challenges, and accountability gaps — especially in regulated environments

Lack of Validation

Raw scripts often accept command-line arguments with minimal validation. This can lead to errors, such as passing the wrong subnet, targeting the incorrect device group, or bypassing a confirmation prompt. Without a proper interface, there's no convenient way to implement input validation, confirmation dialogs, or permission controls.

Introducing Streamlit: Rapid UI for Network Automation

Streamlit is an open-source Python framework that allows developers to create web applications directly from Python scripts — no HTML, no JavaScript, no CSS required. For network engineers who already write Python, this is transformative. The same code that powers a script can be surfaced as a clean, interactive web app in a matter of hours

Why Streamlit is Ideal for Network Teams ?

Streamlit was designed with data scientists and engineers in mind, not professional web developers. Its philosophy is that the person who understands the logic should be able to build the interface. For network automation, this is a perfect fit:

•        Pure Python: No new languages to learn. If you can write a Netmiko or NAPALM script, you can build a Streamlit app.

•        Rapid development: A basic interface can be wrapped around an existing script in under an hour.

•        Built-in widgets: Text inputs, dropdowns, file uploaders, progress bars, and data tables are all available with single-line function calls.

•        Real-time output: Streamlit supports streaming output, making it ideal for long-running tasks like multi-device configuration pushes.

•        Easy deployment: Apps run on any server accessible by the team, including VMs, containers, or internal platforms.

How Streamlit Works (Behind the Scenes)

Streamlit follows a script rerun model.

Every time a user interacts with the UI:

  • The Python script reruns from top to bottom

  • UI state is preserved using session_state

Architecture flow:

User Interaction (Button / Input)
            ↓
Streamlit Reruns Script
            ↓
Updates UI Components
            ↓
Displays New Results

Core Streamlit Components Explained

Text Elements

st.title("Network Config Generator")
st.caption("Generate configs using Jinja2")

Used for headings and descriptions.

Input Widgets

device = st.text_input("Enter Router IP")

Common widgets:

  • text_input

  • selectbox

  • checkbox

  • sliders

  • file uploader

Layout System (Professional Dashboards)

if st.button("Generate Configuration"):
    run_automation()

Buttons trigger Python logic directly.

Session State: The Most Important Concept

Because Streamlit reruns scripts, it uses:

st.session_state

This acts like memory for:

  • Templates

  • User inputs

  • Generated outputs

Real-World Use Case for Network Engineers

Configuration Generator (Jinja2 + YAML)

In recent articles, we've discussed generating dynamic configurations with Jinja2 in a multi-vendor environment and the significance of configuration validation. Throughout the series, we developed several scripts for practical use. We will reuse our automation scripts and integrate them into an interactive, user-friendly interface. With Streamlit, you can quickly prototype a functional GUI without needing frontend skills.

Streamlit transforms a Python script into a self-service tool, empowering teams with independence while maintaining the engineer's control over the underlying logic.

Streamlit in a Network Configuration Generator

A typical architecture:

User Input (Template + YAML)
            ↓
Streamlit GUI
            ↓
Jinja2 Rendering Engine
            ↓
Generated Configuration Output
            ↓
Download or Deploy to Devices

Comparing Streamlit vs Traditional Web Frameworks

Feature Streamlit Flask/Django
Learning Curve Very Low Medium–High
Frontend Required No Yes
Speed of Development Very Fast Slower
Best Use Case Internal tools & dashboards Full-scale web apps

Prerequisites

pip install streamlit 

Run the application

streamlit run app.py 

Try the Correct URL

http://localhost:8501 # On the SAME machine
http://<server-ip>:8501 # If running on a server/VM

Generated Output

Network Configuration Generator UI application

Load Nokia SROS example and Validate :

💡
YAML validation successful

Nokia SROS example Generate Configuration

💡
Configuration generated and Download Config

Limitations of Streamlit

While Streamlit is excellent for internal tools and dashboards, it is not designed for large-scale enterprise web platforms requiring complex authentication, microservices, or highly customized frontends. However, for automation GUIs and engineering tools, it is one of the most efficient solutions available.

Conclusion: Automation is a Team Sport

Network automation has historically been the domain of individual engineers writing scripts for personal use. Streamlit change that equation entirely. It provide the bridge between powerful automation logic and the diverse teams that need to act on it — without requiring every user to become a Python developer or a terminal power user.

Network automation is only truly effective when it is accessible to everyone. A script limited to a single user is a capability restricted to that individual. In contrast, a web application that any team member can utilize becomes a resource for the entire organization.

Build the script. Then build the interface. Automation is only as powerful as its reach.