To continue our journey to build a python API using FASTAPI, we will see how to update a record in the database either fully or partially. These operations are called PUT or PATCH. The fundamental difference between a PUT and PATCH operation is that PUT indicates updating the entire record while PATCH means updating a…
Category: DevOps-NetDevOps
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…
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…
Git for Network Engineers
As more and more network engineers shift towards the world of network automation, GIT is increasingly becoming a more and more important skill set on your resume. While is it not necessary to understand behind the scenes of git for a network engineer or the implementation details of the framework but it indeed is important…
Docker for Network Engineers Part V – Docker Compose
In the previous post about Dockerfiles, we saw how to use a YAML file to define the template of the docker containers/images and use those set of instructions to build and distribute your containers. However, what if the application that you are writing has multiple components to it. For example:- You wrote a device monitoring…
Docker for Network Engineers Part IV – What is a Dockerfile
We have seen the manual method of creating a container from an image and an image back from a container after you have done all the customizations. What if there is a more automated way of doing this. We can achieve the same end goal by using a DockerFile. What is DockerFile? Dockerfile is nothing…
Docker for Network Engineers Part III – Creating a custom docker image/container
In this post on Docker for Network Engineers, From the ubuntu container that we created in the last post, we will now customize the container to install all the base dependencies that we need for our project. apt upgrade apt update apt install software-properties-common add-apt-repository ppa:deadsnakes/ppa apt install python3.9 apt install python3-pip apt install nano…
Docker for Network Engineers Part II – Installation and Basic Usage
Read Part I here Installing Docker Download docker from the official website for your platform. SignUP for Docker Hub. Docker Hub is an online repository of container images made by the official vendors or the community that you can use as a template to build your own application and save them as new containers and…