Cisco NX-OS Python API

Unlock the power of network automation with the Cisco NX-OS Python API.

Introduction to the Python API

This document provides a comprehensive guide to utilizing the Python API within Cisco NX-OS. It details how to write and execute Python scripts to interact with and manage network devices.

The Cisco NX-OS Python package offers access to core network-device modules, including interfaces, VLANs, VRFs, ACLs, and routes. Learn how to leverage these modules for efficient network operations.

Key Features and Capabilities

  • CLI Command APIs: Execute CLI commands directly from Python scripts using various APIs like cli(), clid(), and clip().
  • Display Formats: Understand how to retrieve and display network information in different formats, including raw output and JSON.
  • Scripting and Automation: Discover how to run Python scripts in both interactive and non-interactive modes, and integrate them with features like the Embedded Event Manager (EEM) and scheduler.
  • Security and User Authority: Explore how Role-Based Access Control (RBAC) governs access to Cisco NX-OS resources through Python, differentiating between privileged and nonprivileged users.

Getting Started

This guide includes practical examples and code snippets to help you get started with Python programming on Cisco NX-OS. For detailed information on specific commands and functionalities, refer to the examples provided throughout the document.

For support and additional resources, visit the Cisco Technical Assistance Center (TAC).

PDF preview unavailable. Download the PDF instead.

m-n9k-python-api-101x DITA Open Toolkit XEP 4.30.961; modified using iText 2.1.7 by 1T3XT

Related Documents

Preview Cisco Nexus 9000 NX-OS Fundamentals Configuration Guide, Release 10.2(x)
A comprehensive guide to configuring Cisco Nexus 9000 Series switches running NX-OS Release 10.2(x), covering fundamental concepts, features, and best practices for network management and operation.
Preview Cisco NX-OS SPAN Configuration Guide
A comprehensive guide to configuring Switched Port Analyzer (SPAN) sessions on Cisco NX-OS devices, covering sources, destinations, limitations, and configuration examples for various Cisco Nexus platforms.
Preview Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 7.x
This Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 7.x, provides comprehensive instructions for network administrators on configuring various interface types, Layer 2 and Layer 3 features, port channels, virtual port channels (vPCs), and other advanced networking functionalities on Cisco Nexus switches.
Preview Cisco NX-SDK: A Comprehensive Guide to Network Automation
Explore the Cisco NX-SDK, a C++ abstraction and plugin-library layer for automating Cisco Nexus infrastructure. Learn about its features, requirements, on-box and off-box application development, security profiles, and version history.
Preview Cisco Nexus 9000 Series NX-OS Release Notes, Release 10.2(2)F
This document details the features, issues, and exceptions of Cisco NX-OS Release 10.2(2)F software for Cisco Nexus 9000 Series switches, including new and enhanced software features, unsupported features, and resolved and open issues.
Preview Cisco Nexus Data Broker Configuration Guide, Release 3.1
This guide provides comprehensive instructions for configuring and managing the Cisco Nexus Data Broker software, including installation, setup, traffic aggregation, and system management. It covers various Cisco Nexus switch models and deployment modes.
Preview Cisco Nexus 9000 NX-OS Interfaces Configuration Guide
Detailed guide for configuring interfaces on Cisco Nexus 9000 series switches with NX-OS release 10.2(x). Covers Layer 2, Layer 3, port channels, BFD, and vPC configurations for network professionals.
Preview Configuring sFlow on Cisco NX-OS Devices
A comprehensive guide to configuring sFlow (Sampled Flow) on Cisco NX-OS network devices, covering prerequisites, guidelines, default settings, and step-by-step configuration procedures for traffic monitoring.