Download presentation
Presentation is loading. Please wait.
1
Python for Network Engineers
A Practical Guide for Getting Started Jeremy Schulman @nwkautomaniac
2
Jeremy Schulman @nwkautomaniac
Software Engineer, Network Automation Specialist 20 Years in Industry Since 2012 exclusively focused on "network automation" Other Roles: Developer Advocate Systems Engineer Automation Architect Open source contributor @nwkautomaniac Slides: jeremyschulman Github: jeremyschulman
3
Obligatory Disclaimer
The views and opinions expressed in this presentation are Jeremy Schulman's and do not represent any employer past or present. Reference materials provided in this presentation, such as links to external training sites, do not represent any form of recommendation.
4
Network Engineers need to competently use Python so that they can make, and make use of, power-tools that will improve their jobs. These tools will not replace them.
5
Agenda Discussion Live coding Where to go from here ...
Realistic expectations Getting started Live coding Jupyter Notebook - makes Python feel like a CLI NetOps example exercises Where to go from here ...
6
Managing Networks "Manual via CLI" "SNMP based products"
"Vendor Products" "SDN" "Orchestration Systems" "DevOps" "Network Automation" "Network Engineers must become Software Engineers"
7
Managing Networks "Manual via CLI" "SNMP based products"
"Vendor Products" "SDN" "Orchestration Systems" "DevOps" "Network Automation" "Network Engineers must become Software Engineers"
8
Learning any New Skill [1]
Novice Competent Proficient Expert Master Experience over a long time Use everyday concrete experiences, not abstract concepts Attaining core competency requires instructor led training and / or directed tutorials Jeremy's key takeaways: Attaining proficient skill requires experience and knowledge that takes massive time investment Continuous mentorship, peer-review, feedback, learning, experimentation [1] "A FIVE-STAGE MODEL OF THE MENTAL ACTIVITIES INVOLVED IN DIRECTED SKILL ACQUISITION", STUART E. DREYFUS and HUBERT L. DREYFUS, 1980.
9
Systems are Risky and Complex Manage Distributed Network Services
Configuration Management “config” Situational Awareness “show” High Risk Complex Tasks Low Risk Simple Distributed System (blast radius > 1) Host-Only (blast radius = 1)
10
Where to start using Python
Configuration Management “config” Situational Awareness “show” High Risk Complex Tasks Low Risk Simple "Your network is a crime scene, and you are the detective. You need better ways to investigate what happened, and prove guilt or innocence." -- Jeremy Distributed System (blast radius > 1) Host-Only (blast radius = 1)
11
Make Python *feel* like being on a CLI
Live Coding Make Python *feel* like being on a CLI
12
Jupyter Notebook Setup a Python virtual-environment
$ virtualenv playground $ source playground/bin/activate Install Jupyter notebook for Python 2.7 (playground)$ pip install ipython==5 jupyter Install Jupyter notebook for Python 3 (playground)$ pip install jupyter
13
Jupyter Notebook Start Jupyter notebook system, will launch browser
(playground)$ jupyter notebook
14
Live Demo!
15
Where to go from here ...
16
Novice Topics Variables, duck-typing help(), type(), dir()
pretty-printing Importing packages List, Dictionary Tuple, Set Functions For-loops If / Then / Else Working with files JSON, YAML files List Comprehensions Dictionary Comprehensions Set Comprehensions Collections - Counter Collections - defaultdict
17
Python Libraries ipaddress tabulate first tqdm requests collections
csv json yaml gtextfsm netmiko napalm lxml paramiko bidict operator itertools chain
18
Next Steps Building Novice Skills Building Competency
Take formal Python courses Global Knowledge Subscribe to Python News Dan Bader Try PyCharm IDE (Integrated Development Environment) Use Python every day Use Jupyter notebook Take industry classes IpSpace NetworkToCode Kirk Byers Free Cisco DevNet
19
Closing Thoughts "A good network engineer is proficient at quickly becoming competent." -- Derick Winkworth Be patient. Set realistic goals, both with yourself and your management Consider how long it took you to become a Senior Network Engineer Senior network engineer == 5-8yrs, multiple domains, technology.
20
Jeremy Schulman @nwkautomaniac
Cheers! Jeremy Schulman @nwkautomaniac
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.