A glimpse into Python network automation and APIs (original) (raw)
Article 4 of 5
Part of: A deep dive into network automation with Python
This chapter excerpt from 'Mastering Python Networking' dives into the importance of APIs and network state when working with Python network automation and intent-based networking.
When people ask author Eric Chou how to get started with network automation, he advises them to start small and celebrate small victories.
In his book, Mastering Python Networking, from Packt Publishing, Chou dives into a range of Python network automation scenarios. His goal with the book was to help network engineers who might be in the same position he was when first tackling network automation. Specifically, he wanted to help people who thought they need to reach a certain stage before their skills or knowledge could be useful. Instead, he said incremental automation wins can help engineers move forward.
"Inevitably, you will hit roadblocks and challenging parts," Chou said. "You will have interruptions from family and friends, or you just don't feel like doing it. But, if you celebrate small victories, you're able to sustain that energy and keep going. That's the key: Just keep going, even if you just do a small bit per day."
Network engineers don't need to take on every aspect of network automation at once. Instead, they can find a couple areas they're interested in and work on implementing automation and scripts. For Chou, network automation finally clicked when he moved away from Perl -- which he said didn't align with how his mind processed problems -- and started working with Python. Over time, he found Python enabled him to grow organically and work in different areas.
Eric Chou
Much of the innovation with automation comes from APIs that can build predictability and consistent outcomes into typically unpredictable networks. This predictability is more valuable than ever because teams face more complexity in their environments and must manage an increased number of devices, Chou said.
Below is an excerpt from Chapter 3, "APIs and Intent-Driven Networking," from Mastering Python Networking - Third Edition. In this chapter, Chou explains how APIs build structure into networks and provides various scripts that enable network engineers to implement automation.
Next Steps
Learn how to master network traffic analysis with Python
How to use NAPALM for efficient network management
Best practices for Cisco pyATS test scripts
Dig Deeper on Network management and monitoring
-
Asynchronous programming in Python tutorial
By: Walker Aldridge
-
How to install Python on Windows
By: Cameron McKenzie
-
Best practices for Cisco pyATS test scripts
By: Deanna Darah
-
How to print any star pattern in Python -- or Mojo By: Darcy DeClute
Part of: A deep dive into network automation with Python
Article 4 of 5