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()
, andclip()
. - 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).