Free with an account · For working network engineers

Python Foundations for Network Engineers

Learn Python on the network text you already read every day.

10
lessons
2
modules
Free
with an account

The course is free with a RouteSwitchU account, which takes an email address and a password.

What you will be able to do

  • Pull the fields you need out of show output with strings and regular expressions.
  • Read a config file and turn it into data you can loop over.
  • Hold an inventory in dictionaries and sets, then do the subnet math on it.

Why choose this course?

  1. A graded lab in every lesson

    Start with small scripts, then write reusable functions and a package. Browser checks exercise changed inputs and show which behavior needs correction.

  2. The core language

    You cover strings, numbers, files, lists, conditionals, loops, dictionaries, sets, exceptions, regular expressions, functions, and classes.

  3. Complete the course in your browser

    The capstone provides editable package files and fixtures in the browser. Downloading the project and running a local command-line tool are optional follow-on practice.

Learning roadmap

10 lessons · 2 modules

Begin with text and numbers, learn functions before the function labs, then apply loops, dictionaries, file handling, and parsing. The final package capstone is graded in the browser.

  1. Free foundations 1. From Your First Script to Network Records5 lessons

    Start with text and printed output, then learn numbers, lists, and functions before working with loops and network records. Browser checks use changed inputs to verify the skills you practice.

    • Your First Python Script: Text and Output
    • Numbers and Lists from Network Data
    • Functions: Name a Reusable Step
    • Conditionals and Loops
    • Dictionaries, Sets, Files, and Exceptions
  2. Free foundations 2. Parsers, Objects, and a Package5 lessons

    Extend your core Python with regular expressions, device objects, and libraries. Assemble parsers, audit checks, and a report into the netaudit package; local command-line practice is an extension.

    • Regular Expressions for Show Output
    • Classes and Objects, Part 1
    • Classes and Objects, Part 2
    • Libraries, pip, and Virtual Environments
    • Modules, Packages, and the Capstone
Regular Expressions for Show Outputlab exercise
>>> interface_ip("GigabitEthernet1/0/1 10.20.30.1 YES manual up up")('GigabitEthernet1/0/1', '10.20.30.1')>>> interface_ip("GigabitEthernet1/0/2 unassigned YES unset down down") is NoneTrue
In the regular expressions lesson you write interface_ip(). It reads one line of show ip interface brief and returns the interface name and its address. For a port with no address it returns None, and the lab checks both cases.

Start it now

Create an account and start the first lesson. It takes an email address and a password, no card, and no waiting.