Module 1: Foundation Building Blocks
Learning to code is a continuous process, and Python offers a broad spectrum
of applications, from web development to data science and beyond. Starting
with Python is a great choice, as it is a beginner-friendly and versatile
programming language.
Python Setup
● Why python
● How to install python on your windows PC
● How to set-up LAB
● How to use different IDEs
● How to troubleshoot a bug
Types of Objects & Variables
● Understanding Objects
● Mutable and Immutable Objects
● Objects Example
● Data Type with example
● Understanding Variable
● Understanding Variable with Example
● Variable Naming Conventions
● Lab Tasks
● Numeric Types in Python
● Operators
● Operator precedence
● Working with Binary, Octa or Hexa; Booleans; Strings
● Lab Tasks
Copyright ©Netminion Solutions
All rights reserved. This work is protected under copyright laws and international treaties. No part
of this document may be reproduced, stored in a retrieval system, or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of the copyright owner.
Description Of Strings
● String Theory
● String encode() Parameters
● Conversion to String
● Usage of Print function
● String methods - upper
● String methods - startswith and endswith
● String methods - strip
● String methods - split demo
● String methods - Join
● String methods - is it in string?
● String concatenation
● Capitalize, upper, lower, swap
● startswith endswith
● strip strip rstrip
● isdigit
● Multiplication Operator For string
● String Offset
● Slicing Python strings
● Methods to modify string for convenient outputs
● Python String split()
● join() function in Python
● Python List index()
● Python String | find()
● How to Check if a Python String Contains Another String
● Workbook for fetching some information from real device like
fetching uptime or finding IOS version using
● convert to a string using str()
● escape special character meaning with count
● Old Style text using %
● Strings: New way to do text using {}
● Get show version from switch
● Telnet and string offset
● Show version using len
● Split 1
● List and join
● List and len - use Interface example
● Index introduction
Copyright ©Netminion Solutions
All rights reserved. This work is protected under copyright laws and international treaties. No part
of this document may be reproduced, stored in a retrieval system, or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of the copyright owner.
Python3
● BYTE STRING Introduction
● Why encoding is required
● References where it may used
Description Of Comparisons Lists, Tuples
● Python Comparison Operators
● Boolean Truth Table
● The Key Difference between a List and a Tuple
● Lists In Lists
● Python List Methods with different examples
● Python – Tuples
● Accessing Values, Updating and Delete Tuple Elements
● Basic Tuples Operations
● Commenting Python Code
● How to wrap long lines in Python
● Lab Tasks
● Lists versus tuples
● create a list using split
● lists in lists
● lists versus tuples - documentation
● list merge and extend
● List methods
● lists insert and delete
● list pop index and in
● reverse sort
● len copy list
● Real switch get version using index and slice
● Python3 telnet to switch
● Count
● Use find to get information from a real switch
● Python3 Telnet versus Python2 - Find version of software
● find not found
Copyright ©Netminion Solutions
All rights reserved. This work is protected under copyright laws and international treaties. No part
of this document may be reproduced, stored in a retrieval system, or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of the copyright owner.
Python Functions, Dictionaries and Ranges
Dictionary
● Update, Delete, amend its elements
● Python Range Methods
● Syntax and defining a functions
● Lab Tasks
● Dictionary Theory
● Dictionary Demo
● Combine Dictionaries
● Dictionaries: Clear and check
● Dictionaries: Add values
Python Loops and If Else Statement
● Loops Introduction
● Loop Control Statements
● Python while Loop Statements
● The “FOR” loop in Python
● FOR loop combined with IF statement
● while loop
● infinite while loop with break
● infinite while loop with continue
● while loop with a list
● while loop with else
● for loops
● for loop with dictionary
● for loop with if and lists
Python File Handling Introduction
● Open Function
● date and time method
● Script Reference
● Introduction
● Numeric Types Int and Float
● Int and Float
● Operators
● Operators Part 2
● Operators
Copyright ©Netminion Solutions
All rights reserved. This work is protected under copyright laws and international treaties. No part
of this document may be reproduced, stored in a retrieval system, or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of the copyright owner.
Exception Handling in Python Error Types Overview
● Set up exception handling blocks
● Finally clause
● Lab reference
Python Modules Overview
● The import Statement
● Lab reference
Copyright ©Netminion Solutions
All rights reserved. This work is protected under copyright laws and international treaties. No part
of this document may be reproduced, stored in a retrieval system, or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of the copyright owner.
Module 2: For Networking Aspired Candidates
Python is a powerful and popular programming language that can be used to
interact with Cisco networking devices and automate various network-related
tasks. Python has an extensive ecosystem of libraries and modules that cater to
a wide range of domains and tasks. These libraries make Python an incredibly
versatile and powerful programming language. We would be going to hands-on
for following modules:
Netmiko Association
● Netmiko Introduction
● Login to device through SSH rather than simple telnet.
● Setting Up Netmiko for windows, download and install latest PIP
of Python for Windows
● PIP installation verification and Install Netmiko
● Test a script , while importing Netmiko
● Quick Start 1: Python and Telnet: Configure Cisco Router
● Quick Start 2: Python and Telnet: Configure Switch VLANs
● Quick Start 3: Remove Passwords and improve scripts (Telnet)
● Quick Start 4: Create switch VLANs using loops (Telnet)
● Quick Start 5: Multiple switches, multiple VLANs (Telnet)
● Quick Start 6: In-band management network
● Quick start 7: PEP Style Guide
● Quick Start 8: Opening Files and spacing importance!
● Quick Start 9: Backup switch configurations
● Quick Start 10: Paramiko, SSH, Python and Cisco devices
● Configure NTP server configuration
● Configure DHCP server configuration
● Create a script to configure Vlans using for loop through SSH
● Create a script to Import configurations (scripts/templates) from
outside location
● Create a single script to import two or more files, for different
devices – may be switch or router
● Create a script where dictionary should pick IP address through an
external file (may be from stored repository like excel or notepad)
● Create a script to receive username and password from user to
send in dictionary
Copyright ©Netminion Solutions
All rights reserved. This work is protected under copyright laws and international treaties. No part
of this document may be reproduced, stored in a retrieval system, or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of the copyright owner.
Advanced Netmiko Labs
● Create a script which supports error handling
● Create a script for validating device capability i.e., either a switch
or router
● Create a script to receive files from outside and issues all
commands present in switch configuration file
● over switches and router configuration file to routers only
Napalm Association
● Preview and Install NAPALM
● NAPALM connect to switch 1
● JSON and more commands
● Mac address table, ARP cache
● Use NAPALM to retrieve BGP neighbor information: Multiple Parts
● NAPALM: Multiple BGP neighbors
● Use NAPALM to configure Access lists
● Check if ACL already exists and add if missing
● Use NAPALM for auditing device configs
● Use NAPALM to add multiple config files
● NAPALM: Multiple config files, multiple devices
● Configuration auditing using Napalm to display missing
configuration or adding misplace configuration
Copyright ©Netminion Solutions
All rights reserved. This work is protected under copyright laws and international treaties. No part
of this document may be reproduced, stored in a retrieval system, or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of the copyright owner.
Paramiko Association
● Paramiko Overview
● Paramiko Installation
● Starting With First Script
● Paramiko Script LAB reference
● How to perform configuration over ASA (Optional)
● Basic SSH using Paramiko invoke_shell preview
● Send multiple commands using for loop preview
● SSH known host key Policies in Paramiko
● Paramiko exec_command
● SSH key based authentication to Linux OS
● SSH exception handlings
● SSH Key based authentication with Cisco
● Basic SSH using Paramiko invoke_shell
● Send multiple commands using for loop preview
● SSH known host key Policies in Paramiko
● Paramiko exec_command
● SSH key based authentication to Linux OS
● SSH exception handlings
● SSH Key based authentication with Cisco
Copyright ©Netminion Solutions
All rights reserved. This work is protected under copyright laws and international treaties. No part
of this document may be reproduced, stored in a retrieval system, or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of the copyright owner.
Module 3: For BIG IP/F5 Lovers F5 Access
There are several ways Python can be used in conjunction with F5 products: F5
provides an API called iControl REST API that allows you to programmatically
interact with F5 BIG-IP devices using RESTful endpoints, There are Python
libraries and SDKs developed by the community that wrap the iControl REST
API, making it easier to interact with F5 devices programmatically, and through
ssh libraries.
● Usage
● Methods
● Rest API (http)
● API using (CLI)
Create a Monitor, Pool and Virtual Server
● Create the monitor
● Create the pool
● Collecting Pool Details
● Delete a pool if it exists
● Create the virtual server
Perform the tasks necessary to set up a BIG-IP System
● Set the host name, DNS server, NTP server
● How to generate QKView
● Change the root password
● Save the system configuration (save sys config)
● Change the admin password, and add a description
● Check if BIG-IP System needs to be rebooted, and reboot if
needed
● Create IP addresses for BIG-IP system clustering
● Create external VLAN, attach interface, and create self and
floating IP Addresses
● Create internal VLAN, attach interface and create self and floating
IP Addresses
● Advanced Script 1
● Advanced Script 2
● Advanced Script 3
Copyright ©Netminion Solutions
All rights reserved. This work is protected under copyright laws and international treaties. No part
of this document may be reproduced, stored in a retrieval system, or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of the copyright owner.
Module 4: Start Building your own APP – Advanced
Building a Python CPU (Central Processing Unit) is a complex and ambitious
task, typically performed by highly skilled engineers and needed for good task
knowledge.
● Building F5 script to amend information based on users’ input
● Building a script to fetch CPU utilization and produce it as a
graphically representation in a diagram.
● How to build network diagram using CDP neighbors
Module 5: F5 Project using Django
Django is a high-level, open-source web framework written in Python. It was
developed to help developers build web applications quickly and efficiently. To
get started with Django, you need to have a basic understanding of Python.
You can create a new Django project using the command line and start building
your web application by defining models, views, templates, and URLs.
It has many benefits, some of the key features are - Template Engine,
Authentication and Authorization, Security Features, and Testing Support.
● Django – Web Framework (Basics)
● How to enable Django with HTML
● DTL Usage
● How to enable Django and run python script inside that
● How to enable Django and run python script from somewhere
outside directory
● Create a project which can fetch certificate details from BIG-IP.
Thankyou
Visit Us -
[Link]
Copyright ©Netminion Solutions
All rights reserved. This work is protected under copyright laws and international treaties. No part
of this document may be reproduced, stored in a retrieval system, or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of the copyright owner.