Up until now, we have seen various techniques of dealing with GET requests but this post will deal with the next operation of POST which means creating a new object or resource on the server/database. The table below gives the mapping of the HTTP request methods to CRUD operations. Let’s see how to use POST…
Python API Using FASTAPI – For Network Engineers – Path and Query Parameters – Part III
To make a properly documented Python API Using FastAPI, we can use fastapi’s Path and Query module to pass in more parameters that give more context to that the path and query variables that we use. For example from previous posts if we consider this little excerpt PATH PARAMETERS And now if we go to…
Python API Using FASTAPI – For Network Engineers – Dynamic Routes – Part II
In Part 1 we saw how to get started with FASTAPI and writing simple GET endpoints. In this post, we will see how we can configure dynamic routes to accept variables in the get request. Please note I am not referring to passing query parameters here. We will see how to use query parameters in…
Python API Using FASTAPI – For Network Engineers – Part I
There are multiple frameworks one could leverage to write a simple API but in this post, we are going to talk about a relatively newer framework called FASTAPI for writing your own quick and simple python API using FASTAPI for network automation. Step1:- Create a virtual environment and install the required libraries. Step2:- Download database.csv…
Python List Comprehensions
From the perspective of a network engineer who has just started out on their journey to learn python and network automation, one of the first intimidating concepts that they are likely to come across is the list comprehensions. In this post we will try and cover the basics of python list comprehensions If you have…
Netbox Docker Installation [Quick and Easy]
There are a couple of ways you can install Netbox. The first one is a little time-consuming bare-bones method while the second one leverages docker and is just plug and play method. Let’s take a look at Netbox Docker installation method but If you aren’t familiar with Docker, here is a 5 part series that…
Cisco SDWAN Vulnerability Scanner using Python
Cisco does have a bug toolkit to programmatically fetch the vulnerability information but it doesn’t have any such API for SDWAN vulnerability information yet. So I had the option to create a web scraper to fetch that information into an excel sheet and update it automatically at a click of a button. Let’s take a…
What is YAML For Network Engineers
YAML Ain’t Markup Language. From official documentation, YAML is a data serialization standard for all programming languages. Let’s break it down to understand what does MarkUp and data serialization standard really means and the relevance of YAML for network engineers. Q1:- What is a Markup Language? Ans:- A Markup Language is not really a language…
[Advanced] Jinja2 Template Inheritance
Jinja2 template inheritance is probably the most powerful feature of the Jinja2 templating library that makes it super easy to scale in large projects and at the same time making it modular and easy to maintain. Most of the time you will find the concept of inheritance explained in the context of web development as…
Basics of Python Jinja2 Templating Library.
In the previous Jinja2 post, we have seen a basic use case for network configuration automation. In this post, let’s dive into the basics of Python Jinja2 templating library. The intent is to cover fundaments of jinja2 that most of the time are overlooked because tend to dive directly into the “how to use jinja2”…