Tutorials
Tutorials¶
"Learn by Doing β Build Production Skills One Script at a Time"¶
Welcome to the Nautomation Prime Tutorials! This section is your hands-on laboratory for developing real-world network automation skills. Each tutorial provides complete, working code with line-by-line explanations so you understand exactly what every line does and why.
Python Prerequisite
This site focuses on applying Python to network automation. We assume familiarity with core Python concepts (variables, functions, loops, exceptions, and file I/O). If you're new to Python, complete a fundamentals course first, then return here.
π Tutorial Paths¶
Our tutorials are organized by skill level to match your Python experience:
π’ Beginner¶
Perfect if you're new to network automation or want to master the fundamentals.
- Focus: Core concepts, simple workflows, fundamental libraries
- Prerequisites: Basic Python knowledge (variables, functions, loops)
- Topics: Netmiko basics, TextFSM parsing, Excel exports, basic error handling
Start Here: Send a Show Command and Export to Excel
π‘ Intermediate¶
Ready to handle more complex scenarios and multi-device operations.
- Focus: Multi-threading, advanced parsing, data aggregation, professional development practices
- Prerequisites: Comfortable with beginner concepts, understand functions and data structures
- Topics: Threading & concurrency, custom TextFSM templates, Pydantic validation, Jinja2 templating, structured logging, argparse CLIs, retry logic, code organisation
New Production Patterns Available:
- Testing Automation Scripts
- Credential Management for Network Automation
- Error Recovery and Rollback
- State Management and Idempotency
- Structured Logging for Network Automation
- Health Checks and Pre-Flight Validation
π§© Capstone: Build a Config Deployment Pipeline¶
The bridge between intermediate and expert. Seven chapters that build one project combining everything the intermediate track teaches separately.
- Focus: How the pieces join β what each stage of a pipeline refuses to pass on
- Prerequisites: The data modelling quartet, plus Nornir and PyATS fundamentals
- You'll build:
netpipeβ intent in YAML, validated with Pydantic, rendered with Jinja2, reviewed as a diff, gated by pre-flight checks, deployed in batches with Nornir, proven with PyATS, rolled back on failure, and recorded as an audit artefact
Start Here: Capstone Project Overview
π΄ Expert¶
Production-grade automation with enterprise patterns and advanced techniques.
- Focus: Scalability, fault tolerance, security, enterprise framework integration
- Prerequisites: Strong Python skills, experience with intermediate tutorials
- Topics: Nornir framework, asyncio, NAPALM, PyATS, database integration, credential vaulting, API development, GitOps, CI/CD, containerization, observability
New Production Patterns Available:
- Circuit Breakers and Backpressure
- Dependency Management and Task Orchestration
- Incident Response Automation
βοΈ Production-Grade Network Automation Principles¶
This track focuses on how to run automation safely in enterprise production environments.
- Focus: Risk reduction, validation strategy, failure handling, governance, and operational trust
- Prerequisites: Working knowledge of network automation and change control processes
- Topics: Identity validation, pre-flight enforcement, trust boundaries, drift handling, idempotency, blast radius control, safe failure, rollback strategy, workflow phase separation, operator-friendly output, audit evidence, secret hygiene, human approval gates, and deciding when not to automate
Start Here: Production-Grade Network Automation Principles Index
π€ Governed AI for Network Operations¶
This track covers how to let AI help engineers operate a network without giving a language model an execution path to your infrastructure.
- Focus: Tool boundary design, AI risk classification, evidence requirements, and agent review
- Prerequisites: Familiarity with the production-grade principles above; a trusted source of truth
- Topics: The interpret-versus-execute boundary, why prompt instructions are not controls, narrow typed tools, AI-0 to AI-4 risk classes, refactoring existing scripts into governed tools, and a ten-question agent review checklist
Start Here: Governed AI for Network Operations
π― Tutorial Philosophy¶
Every tutorial follows these principles:
- Complete & Runnable β All code is fully functional. No "TODO" sections or pseudocode.
- Line-by-Line Explanation β We explain what each line does, not just the overall concept.
- Production-Aware β Even beginner tutorials introduce best practices you'll use in production.
- Copy-Paste Friendly β Code is formatted for easy copying and immediate use.
Between the Lines
Every discipline that rewards patience calls the resulting skill something differentβgongfu in the tea room, muscle memory on the range, fluency in a language. In automation it just looks like code you no longer have to think hard about. It's built the same way every time: repetition, not shortcuts.
And the point of no longer having to think hard about something is not that you can then do more of it. It's that you get to think about something else entirely.
π How to Use These Tutorials¶
- Choose Your Level β Start with beginner if you're new to network automation
- Follow Along β Type or paste the code into your own environment
- Experiment β Modify the examples to work with your own network devices
- Build Up β Each tutorial introduces concepts used in more advanced lessons
π‘ Prerequisites¶
All tutorials assume you have:
- Python 3.8+ installed
- Basic Python knowledge (variables, functions, loops, dictionaries)
- Access to Cisco devices (physical or virtual like CML, EVE-NG, or GNS3)
- pip for installing required libraries
Not Sure Where to Start?
If you're new to Python network automation, begin with our Beginner Tutorial Index and work through the scripts in order. Each one builds on concepts from the previous tutorial.
π Related Resources¶
- Deep Dives β In-depth technical analysis of production automation
- Scripts β Ready-to-deploy automation tools
- Getting Started β New to Nautomation Prime? Start here
Need help applying this beyond the lab?
If you're moving from tutorials to governed production automation, review our Enterprise Automation Services or the PRIME Framework.