unicon
Unicon Connection Library
What it is and what it does
Unicon is a connection library that abstracts away the complexity of CLI-based network device management. It wraps underlying session protocols (telnet, SSH, serial) and provides expect-like pattern matching and command execution without requiring low-level session handling. The library handles multi-vendor devices through a plugin architecture, automatically manages CLI mode transitions (enable, configure, etc.), detects command errors and rejected commands, and offers platform-specific stateful services.
The package is the standard connection layer for the Cisco pyATS automation framework and is designed for network engineers and automation developers who need reliable, vendor-agnostic CLI access to devices. It depends on pyyaml for configuration, dill for serialization, and unicon.plugins for platform-specific behavior.
Use it for:
- Automate command execution across multiple Cisco or multi-vendor network devices without managing raw SSH/telnet sessions.
- Build network configuration management scripts that handle mode transitions and error detection automatically.
- Integrate device CLI access into larger pyATS-based test or validation frameworks.
- Develop custom network automation plugins for unsupported device platforms using the plugin architecture.
- Establish proxied connections to devices behind jump hosts or management interfaces.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Unicon provides a unified CLI connection interface to network devices, wrapping telnet, SSH, and serial connections with expect-like programming and multi-vendor support through a plugin architecture.
Yes. Unicon is actively maintained, carries no known vulnerabilities, uses a permissive Apache 2.0 license, and is the standard connection layer for pyATS. Install it if you need reliable, multi-vendor CLI device access or are already using pyATS. The medium install friction is offset by pre-built wheels for modern Python versions.
Install
unicon on PyPI
pip
pip install uniconuv
uv add uniconpoetry
poetry add uniconInstalling unicon
Before you install
Active maintenance with a release within the last week. Medium install friction due to compiled wheels across multiple Python versions (3.10–3.14) and platforms, but pre-built binaries are available for common architectures.
License in practice
Licensed under Apache 2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install unicon
from unicon import Connection
conn = Connection(hostname='device', start=['ssh'])
conn.connect()
output = conn.execute('show version')
conn.disconnect()
Requires Linux, macOS, or WSL; network device must be reachable via telnet, SSH, or serial interface.
Verify before relying
- Exact list of supported network device platforms and vendors beyond Cisco.
- Performance characteristics and scalability limits for concurrent connections.
- Whether unicon.plugins is a separate package or bundled dependency.
Package facts
| License | Apache 2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 3 — pyyaml, dill, unicon.plugins |
| Maintenance | actively maintained — 7 days since the last release |
| First released | |
| Downloads | 336,883/month — #7,455 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: unicon-26.7-cp310-cp310-macosx_11_0_universal2.whl; unicon-26.7-cp310-cp310-manylinux2014_aarch64.whl; unicon-26.7-cp310-cp310-manylinux2014_x86_64.whl; unicon-26.7-cp311-cp311-macosx_11_0_universal2.whl; unicon-26.7-cp311-cp311-manylinux2014_aarch64.whl; unicon-26.7-cp311-cp311-manylinux2014_x86_64.whl; unicon-26.7-cp312-cp312-macosx_11_0_universal2.whl; unicon-26.7-cp312-cp312-manylinux2014_aarch64.whl; unicon-26.7-cp312-cp312-manylinux2014_x86_64.whl; unicon-26.7-cp312-cp312-musllinux_1_2_x86_64.whl; unicon-26.7-cp313-cp313-macosx_11_0_universal2.whl; unicon-26.7-cp313-cp313-manylinux2014_aarch64.whl; unicon-26.7-cp313-cp313-manylinux2014_x86_64.whl; unicon-26.7-cp314-cp314-macosx_11_0_universal2.whl; unicon-26.7-cp314-cp314-manylinux2014_aarch64.whl; unicon-26.7-cp314-cp314-manylinux2014_x86_64.whl
Keywords: unicon, connection, pyats, cisco
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
unicon.pluginsUnicon Plugins extends the unicon package with…
permissive · top 15,000 on PyPI
pyats.connectionsProvides device connection abstraction and base…
permissive · top 15,000 on PyPI
rest.connectorProvides REST API connectivity for network…
permissive · top 15,000 on PyPI
netmikoNetmiko simplifies SSH connections to network…
permissive · top 5,000 on PyPI
scrapliscrapli is a Python library for connecting to…
permissive · top 15,000 on PyPI
pyats.topologyModels network testbeds, devices, interfaces,…
permissive · top 15,000 on PyPI
yang.connectorProvides NETCONF and gRPC/GNMI client…
permissive · top 15,000 on PyPI
paramiko-expectParamiko Expect adds expect-like pattern…
permissive · top 15,000 on PyPI
genieGenie is a test automation library and harness…
permissive · top 15,000 on PyPI
pyatspyATS is Cisco's end-to-end testing framework…
permissive · top 15,000 on PyPI