Python for Network Engineers: Getting started

Network Engineers are Developers! No more excuses.

Photo by Sebastian Unrau / Unsplash

Learning Python is not harder then studying for CCNA exam. There are almost unlimited number of books, blog posts and other materials out there. Python is just so popular.

The good news is we don’t need to know everything to start using it, and this is one of the many advantages the language has.

Automating a boring task in form of a script is the first simple use-case. We might extend the project, and get some structure in-place later. Perhaps we begin to use classes and decorators during the journey.

Structuring the project

In Python, the file structure of the project matters. At root directory of the project we have some well know files worth creating:

  • requirements.txt: capture dependencies
  • LICENSE: License of the project
  • README.md: documentation

Actual code is structured into one or more python files. As the appliaction gets more complicated, python provides option to package functions into modules. Modules are essentially folders in the project directory including python files. Usually a single file __init__.py instucts the interpeter that a folder is a module. However this file is no longer mandatory from Python 3.3+.

To get more information regarding starting a project, check out these fine blog posts:

Learning Python requires practices. Sites below offer interactive trainings and tutorials. They are mostly free, so check out them, and decide which one is better.

Python Do it your self

Python Tutorials

For reference, it is also good to use some books. I have included a few, but there are so many others..

Python Books

Python Design Patterns

Python Podcasts

I recommend to subscribe to medium, it has a lot of fine development related articles.

That's it for now, but in the next post I will try to collect Network Engineering related materials.