netmiko
Multi-vendor library to simplify legacy CLI connections to network devices
What it is and what it does
Netmiko is a multi-vendor SSH library designed to automate network device management by providing a unified interface for executing show commands and configuration changes across different network platforms. Rather than requiring developers to write low-level SSH and regex parsing logic for each device type, Netmiko abstracts these details away—you define a device dictionary with connection parameters, instantiate a ConnectHandler, and call methods like send_command() or send_config_set() to interact with the device. The library handles SSH session management, command mode transitions, and output parsing internally.
The package depends on paramiko for SSH transport, pyserial for serial connections, textfsm and ntc-templates for structured output parsing, pyyaml and ruamel.yaml for configuration handling, scp for file transfer, and rich for terminal output formatting. It supports modern Python versions (3.10 through 3.14) and is actively maintained with no known security vulnerabilities. The library is well-suited for network engineers building automation scripts, configuration management tools, or monitoring systems that need to interact with CLI-based network devices.
Use it for:
- Gather interface statistics and routing tables from multiple Cisco, Arista, or Juniper devices in a single script without vendor-specific SSH logic
- Apply configuration changes across a fleet of network devices by passing a list of commands to send_config_set()
- Parse structured data from show command output using TextFSM templates for programmatic analysis
- Build network inventory tools that query device facts and system information via SSH without manual state management
- Automate backup of running configurations from network devices and store them centrally
- Transfer files to and from network devices using the integrated SCP support
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Netmiko simplifies SSH connections to network devices across multiple vendors, automating CLI command execution and configuration changes while abstracting away low-level state management.
Yes. Netmiko is a mature, actively maintained library with strong community adoption (4246 stars, top 5000 PyPI packages), zero known vulnerabilities, permissive MIT licensing, and low install friction. It directly solves the problem of multi-vendor network device automation with a clean API. Install it if you need to automate CLI-based network device management.
Install
netmiko on PyPI
pip
pip install netmikouv
uv add netmikopoetry
poetry add netmikoInstalling netmiko
Before you install
Low install friction with a pure-Python wheel distribution. The package is actively maintained with recent releases and has accumulated 4246 repository stars since its first release in 2015, indicating stable, long-term community support.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most network automation projects without licensing concerns.
Quickstart
from netmiko import ConnectHandler
device = {
'device_type': 'cisco_ios',
'host': '10.10.10.10',
'username': 'admin',
'password': 'password',
}
net_connect = ConnectHandler(**device)
output = net_connect.send_command('show ip int brief')
print(output)
net_connect.disconnect()
Requires SSH access to the target network device; device_type must match a supported platform in netmiko's CLASS_MAPPER.
Verify before relying
- Exact number of supported device types and vendors beyond 'broad set of platforms' mentioned in description
- Whether TextFSM integration requires additional configuration or is automatically available
- Performance characteristics when managing large numbers of concurrent device connections
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — ntc-templates, paramiko, pyserial, pyyaml, rich, ruamel.yaml, scp, textfsm |
| Maintenance | actively maintained — 94 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,234,277/month — #4,179 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: netmiko-4.7.0-py3-none-any.whl
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
napalmNAPALM provides a unified Python API to…
permissive · top 15,000 on PyPI
scrapliscrapli is a Python library for connecting to…
permissive · top 15,000 on PyPI
unicon.pluginsUnicon Plugins extends the unicon package with…
permissive · top 15,000 on PyPI
paramikoParamiko is a pure-Python SSH protocol library…
copyleft · top 1,000 on PyPI
uniconUnicon provides a unified CLI connection…
permissive · top 15,000 on PyPI
jumpsshJumpSSH runs commands on remote servers through…
permissive · top 15,000 on PyPI
pyats.connectionsProvides device connection abstraction and base…
permissive · top 15,000 on PyPI
ncclientncclient is a Python library that implements…
permissive · top 5,000 on PyPI
netconf-clientA NETCONF client library for Python that…
permissive · top 15,000 on PyPI
ntc-templatesProvides a repository of TextFSM templates for…
permissive · top 5,000 on PyPI