REST APIs with requests: Talking to DNAC and Meraki-Style Controllers
Drive network controllers with Python's requests library — HTTP verbs, status codes, token auth, JSON bodies, and the token-then-query pattern used by DNA Center and Meraki.
Drive network controllers with Python's requests library — HTTP verbs, status codes, token auth, JSON bodies, and the token-then-query pattern used by DNA Center and Meraki.
Use Jinja2 to turn a YAML inventory into finished device configs — expressions, loops, conditionals, file-based templates, and filters, the same engine Ansible uses.
Read and write YAML and JSON from Python to separate network data from code — json vs yaml, safe_load, and an inventory-driven Netmiko pattern with no hardcoding.
NAPALM gives network engineers one Python API across Cisco, Arista, and Juniper — normalized getters plus config diff, commit, and rollback for safe multi-vendor automation.
Netmiko makes router SSH automation easy: send_command with TextFSM parsing, send_config_set for changes, save_config, enable mode, and fleet-wide pushes with error isolation.
Drive a real SSH session to a router from Python with Paramiko — exec_command vs invoke_shell, disabling paging, handling auth failures, and a reusable connect-and-run helper.
Build a TCP port reachability checker with Python's socket module — connect_ex, timeouts, DNS resolution, and a management-plane service audit across a device list.
Run ping, traceroute, and nslookup from Python with subprocess.run — capture output, check return codes, set timeouts, and avoid shell-injection bugs.
Use Python's re module to pull IPs, MACs, interface counters, and BGP states out of show command output — with named groups and the metacharacters that cover most network parsing.
Python's built-in ipaddress module handles subnets, host iteration, overlap detection, and subnetting for network engineers — no pip install required.