I want to share a recent addition to my network automation toolbox - Dq (Dictionary query).
Dq is a Cisco Genie library that provides various helper functions to ease the parsing of nested Python dictionaries.
For example, let's say we have the following Python dictionary.
>>>
One project that I'm starting to use more and more is Rich. In short, Rich is a Python library for:
writing rich text (with colour and style) to the terminal and displaying advanced content such as tables, markdown, and syntax highlighted code.
... and I have to say, it
Previously we looked at how to -- Style your Python Code like a Pro -- using the tool, Black.
However, what about if there is a typo in your code? For example, a missing colon or closing bracket. This is where linting comes into play.
Linting is the process of
For those of you who are automating your networks with Python, here's a little tool that will save you a ton of time and also make your code look like it's been written by a pro! Its called Black.
Black is an awesome code formatter that
What is the Walrus Operator?
Python 3.8 introduces the creatively named "walrus" operator. Expressed via :=, the walrus operator allows you to assign values to a variable as part of an expression. The key benefit to this new operator is that it reduces the amount of written code
Have you ever seen some Python code and wondered what @staticmethod and @classmethod do ?
Well, let me explain ...
@staticmethod
A static method is a method that knows nothing about the class or instance it was called on. The class instance, therefore, is NOT passed in as an implicit first argument
What is NSoT?
Network Source of Truth (NSoT) is a Django based opensource application for the management of IP addresses (IPAM), network devices and network interfaces.
NSoT provides the following for the administration of the database inventory:
* REST-based API
* CLI client
* Python modules
* UI
As you will shortly see the
6 min read
Subscribe to our newsletter and stay updated.
Don't miss anything. Get all the latest posts delivered straight to your inbox.