Everything is Python
Although you don’t need to know Python to use the pyATS ecosystem, it might help you to understand the structure of the Python-based commands described in this guide.
Tip
Remember, you can use the Library command line for network automation and never have to enter a Python command!
The following example explains the statements used to connect to a device and parse output from the show inventory
command.
Number |
Statement |
Description |
---|---|---|
1 |
|
Get the |
2 |
|
Load the |
3 |
|
Find the |
4 |
|
Connect to the device you defined as |
5 |
|
Parse the |
6 |
|
Print a meaningful message and the serial number for Slot 1. |
Tip
If you want to know more about how to use Python, you can find many good online tutorials.