skillfed

unicon

Unicon Connection Library

unicon v26.7 336.9K downloads/30d#7,455 on PyPI
Permissive license Apache 2.0 Active released

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 unicon

uv

uv add unicon

poetry

poetry add unicon

Installing 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

Development Status :: 5 - Production/StableDevelopment Status :: 6 - MatureEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsIntended Audience :: Telecommunications IndustryLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Build ToolsTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Testing

Tags

network device cli connectiontelnet ssh serial wrapperexpect-like network automationmulti-vendor device managementcisco pyats connection librarycli session handlingnetwork device mode switching
network-automationdevice-managementcisco-pyats

More Libraries packages