+44 (0)1737 821590
Advanced Python for network engineers  |    A 5 day   hands on   training course

Advanced Python training course description

This course caters to network engineers aiming to enhance both their Python proficiency and network automation skills. Delving deeper into key areas such as netmiko, Nornir, and ncclient, we also focus on automating network testing and validation. Participants gain greater confidence working with Python functions, classes, objects, and error handling. The course additionally introduces more libraries like Scrapli, TTP, pyATS, Genie, pybatfish, and Suzieq, which cover parsing strategies, automation testing, validation, network analysis, observability, and telemetry. The curriculum also encompasses concurrency techniques.

What will you learn
  • Write Python modules and functions.
  • Evaluate techniques to parse unstructured data.
  • Use NETCONF filters.
  • Handle Python errors effectively (try, assert…).
  • Use postman.
  • Automate testing and validation of the network.
  • Use scrapli, Genie, batfish and Suzieq.
Advanced Python training course details

Advanced Python training course contents

  • Review
  • CLI, NETCONF, RESTCONF, structured versus unstructured data, gNMI and when to use which. PEP 8. Naming conventions. Packages, modules, Classes and methods. The scrapli library. Netmiko versus scrapli.
    Hands on: scrapli, Dictionaries versus Regular Expressions.

  • Modules and Functions
  • Writing your own modules, containers versus packages, virtual environments. Best practices, calling functions, writing your own functions. Parameters, arguments. Named arguments, dictionaries as arguments. Builtins. Docstrings. Main. __name__, __main__ . Program arguments.
    Hands on: Getting interfaces, showing interface status using Netmiko and functions. Using dictionaries as arguments. Writing your own modules.

  • Parsing strategies
  • Turning unstructured data into structured data. textfsm, PyATS Genie parser, NAPALM getters, Template Text Parser.
    Hands on: Genie parser, TTP. Accessing structured data with lists and dictionaries.

  • Classes, objects and Python
  • Python classes in Genie, PyEZ and others .
    Hands on: studying network automation classes, objects, methods and attributes.

  • Configuration management – more nornir, ncclient, requests
  • Nornir tasks. Nornir results, Nornir functions, Nornir plugins. Nornir processors. YANG, YANG models, pyang. NETCONF hello. Capabilities. Schemas. Filters. Subtrees. XPATH. Exploring available YANG data models. NETCONF and network wide transactions. Asserting NETCONF capabilities. Configuration types. Locking configurations, commits. NETCONF data stores. Netconf-console. RESTCONF differences from NETCONF. URI construction. Postman. More XML and JSON. Git and configuration versions.
    Hands on: Nornir and Jinja2. Exploring available models, NETCONF filters. Using postman.

  • Python error handling and debugging
  • Context handlers, try, assert, logging, pdb, pytest, unit testing, chatgpt.
    Hands on: Writing code with each of the error handling methods, investigating what happens on an error. Use chatgpt to debug your code.

  • Python Automation Testing
  • Testing and validation. pyATS, Genie. Testbed file. Genie parse, genie learn, genie diff. Genie conf, Genie ops, Genie SDK, Genie harness. Xpresso.
    Hands on: Using Genie for state comparisons of the network.

  • Network analysis
  • Batfish, pybatfish, configuration analysis, analysing routing, analysing ACLs. Pandas. Pandas dataframe. Filtering and selecting values of interest.
    Hands on: Use Batfish to analyse network snapshots, find network adjacencies, flow path analysis.

  • Network observability
  • Suzieq, using docker, using as a package. Sqpoller, suzieq-gui, suzieq-cli, sq-rest-server. Namespaces and seeing devices, network state and Asserts. Time based analysis, snapshots and changes.
    Hands on: Suzieq: Gathering data from the network, analysing data from the network. Network state assertion.

  • Telemetry
  • gRPC, gNMI. CAP, GET, SET. Subscriptions. Model Driven telemetry.
    Hands on: Analysing telemetry data with Python.

  • Concurrency
  • asyncio, threads, processes. Nornir concurrency. Scrapli and netmiko concurrency.
    Hands on: Multiple SSH connections to devices at same time. Scarpli asyncio.

Learning path


This is a new course

Below ratings are overall customer ratings

B. M. - London Internet Exchange

"Excellent presentation - very good course structure."

M. S. - LINX

"Great course, learned a lot, and do it again if technology changed."

Training approach

This structured course uses Instructor Led Training to provide the best possible learning experience. Small class sizes ensure students benefit from our engaging and interactive style of teaching with delegates encouraged to ask questions throughout the course. Quizzes follow each major section allowing checking of learning. Hands on sessions are used throughout to allow delegates to consolidate their new skills.