Skip to content

Network Automation

My journey with Network & Cloud Automation

Menu
  • Beginner
  • DevOps-NetDevOps
  • Network Automation
    • Docker
    • Python Libraries
      • NAPALM
      • Netmiko
      • Jinja2
      • Scrapli
      • Yang
  • Cloud Automation
    • Terraform
  • Python 🐍 Tips and Tricks
Menu

Category: Python Libraries

Netmiko TEXTFSM

Netmiko SSH Proxy/JumpServer

Posted on February 21, 2022February 21, 2022 by Gurpreet Kochar

This post is going to talk about the ways you could use to access the end devices through the jump server or a proxy server. I am going to use Netmiko which is my all-time favorite tool whenever I need to programmatically interact with network devices. Let’s see how we can leverage Netmiko SSH proxy…

Read more
Netmiko TEXTFSM

Netmiko SSH Proxy via JumpHost

Posted on November 22, 2021January 30, 2022 by Gurpreet Kochar

Off late I have been required to access the network devices through a JumpHost. One of the easiest methods to do this was using python’s netmiko module. My setup looks like this Windows Machine ——- SSH tunnel ——- Linux JumpHost ——-SSH to ——- Network Devices Here are the basic steps that I followed to get…

Read more
pydantic

What is Pydantic?

Posted on November 19, 2021November 9, 2021 by Gurpreet Kochar

While reading about FASTAPI, it became more imperative to understand a little more about Pydantic to be able to build a better and more robust self-made API. In this post, I will try to answer the questions I had on my journey to understand more about FASTAPI. What is Pydantic and What is it used…

Read more
fastapi_5

Python API Using FASTAPI – UPDATE – PUT – PATCH – Part V

Posted on November 15, 2021November 5, 2021 by Gurpreet Kochar

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…

Read more
fastapi_4

Python API Using FASTAPI – POST – CREATE – Part IV

Posted on November 11, 2021October 29, 2021 by Gurpreet Kochar

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…

Read more
fastapi_3

Python API Using FASTAPI – For Network Engineers – Path and Query Parameters – Part III

Posted on November 8, 2021October 29, 2021 by Gurpreet Kochar

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…

Read more
fastapi_2

Python API Using FASTAPI – For Network Engineers – Dynamic Routes – Part II

Posted on November 4, 2021November 4, 2021 by Gurpreet Kochar

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…

Read more
fastapi_1

Python API Using FASTAPI – For Network Engineers – Part I

Posted on November 1, 2021November 4, 2021 by Gurpreet Kochar

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…

Read more
jinja2

[Advanced] Jinja2 Template Inheritance

Posted on September 22, 2021August 29, 2021 by Gurpreet Kochar

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…

Read more
jinja2

Basics of Python Jinja2 Templating Library.

Posted on September 20, 2021August 29, 2021 by Gurpreet Kochar

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”…

Read more
  • 1
  • 2
  • 3
  • Next
All Blog Posts
My Resume

Upcoming Posts

Sorry - nothing planned yet!

Recent Posts

  • How to backup configuration to TFTP Server using Ansible – Part II
  • How to backup network devices using Ansible – Part I
  • Netmiko SSH Proxy/JumpServer
  • A short note on SASE
  • Understanding Ansible

Recent Comments

  1. Gurpreet Kochar on Netbox Docker Installation [Quick and Easy]
  2. rayk32 on Netbox Docker Installation [Quick and Easy]
  3. Python API Using FASTAPI - For Network Engineers - Part I – on Python API Using FASTAPI – For Network Engineers – Dynamic Routes – Part II
  4. Python API Using FASTAPI - For Network Engineers - Dynamic Routes - Part II – on Python API Using FASTAPI – For Network Engineers – Part I
  5. Netbox Docker Installation [Quick and Easy] – Network Automation on Docker for Network Engineers Part V – Docker Compose

Archives

  • September 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
Topic Request / Suggestion
Loading
© 2023 Network Automation | Powered by Minimalist Blog WordPress Theme
Network Automation
Proudly powered by WordPress Theme: MinimalistBlogger.
 

Loading Comments...