Python is an interpreted programming language
Node.js is a JavaScript runtime. Developers like it because the JavaScript foundation provides a consistent language across web (sometimes called "frontend") and application (sometimes called "backend") development.
Atom is an open source text editor
Postman is a powerful REST API client that provides a set of capabilities for testing, exploring, and writing REST APIs.
ngrok is an application that you run on your environment, and it builds a connection path from the public internet to your local workstation. Because you start the tool from your workstation, ngrok
works well through firewalls, proxies, and NAT services
If you do NOT have AnyConnect, open source alternative OpenConnect
An application container is a packaging method to combine application code and any dependencies in an efficient format so that it can be easily run in isolation from other containers on a host.
Docker is an application container engine
Git is Source Control Systems: git-bash
Python Virtual Environments are a method of creating isolated "environments" with specific versions of Python installed along with independent sets of libraries and dependencies.
py -3 -m venv py3-venv
source py3-venv/Scripts/activate
deactivate
vscode : Visual Studio Code code.visualstudio.com
Download and installation
python.org
pip is the package installer for Python
pypi.org
Data Types
Strings, Integers, Lists and Dictionaries
Installing and importing packages
The Python Package Index (PyPI) is a repository of software for the Python programming language.
pypi.org
search for junos-eznc
command "pip" is used to install package.
in Windows cmd, not Python
pip install junos-eznc
pip freeze (show package version)
Find pip installed packages
pip list
ssh into network devices using netmiko
pip install netmiko
cat2960 = {
"device_type": "cisco_ios",
"ip": "192.168.2.20",
"username": "admin",
"password": "admin",
"secret": "cisco"
}
net_connect = ConnectHandler(**cat2960)
net_connect.enable()
output= net_connect.send_command("show vlan brief")
print(output)
for vlan in range (10,51,10):
config_commnds = ["vlan " + str(vlan), "name Netmiko_VLAN_" + str(vlan) ]
output = net_connect.send_config_set(config_commnds)
print (output)
output= net_connect.send_command("show vlan brief")
print(output)
net_connect.disconnect()
from getpass import getpass
cat2960 = {
"device_type": "cisco_ios",
"ip": "192.168.2.20",
"username": "admin",
"password": getpass(),
"secret": "cisco"
}
net_connect = ConnectHandler(**cat2960)
print(net_connect.find_prompt())
net_connect.disconnect()
What’s the Difference Between YAML and JSON?
Python Collections (Arrays)
There are four collection data types in the Python programming language:
- List is a collection which is ordered and changeable. Allows duplicate members.
- Tuple is a collection which is ordered and unchangeable. Allows duplicate members.
- Set is a collection which is unordered, unchangeable*, and unindexed. No duplicate members.
- Dictionary is a collection which is ordered** and changeable. No duplicate members.
GIT
github
git fetch
git merch
Comments
Post a Comment