denapom11 / GSXFY192002

Code Repo for Coding 2002 GSX FY19

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Part 3: Useful Python Libraries for Network Engineers

"Gitting" the Code

All of the code and examples for this lesson is located in the netprog_basics/programming_fundamentals/python_part_3 directory. Clone and access it with the following commands:

git clone https://github.com/CiscoDevNet/netprog_basics
cd netprog_basics/programming_fundamentals/python_part_3

Local Workstation Setup

Be sure to complete the General Workstation Setup instructions before beginning this lesson.

Python Environment Setup

It is recommended that this lesson be completed using Python 3.6. A recent version of Python 2.7 or Python 3.5 should also work.

It is highly recommended to leverage Python Virtual Environments for completing exercises in this course.

There is no need to create independent venv for each lesson, but you can if you choose. At a minimum you should create 2 venvs, one for Python 2 and one for Python 3.

Follow these steps to create and activate a venv.

Note: If you are leveraging a shared venv across all lessons simply activate it.

# OS X or Linux 
virtualenv venv --python=python3
source venv/bin/activate
# Windows (assumes Python 3 is default)
virtualenv venv 
venv/Scripts/activate 

Install Python Requirements for Lesson

With the Virtual Environment activated, use pip to install the necessary requirements.

# From the code directory for this lesson
pip install -r requirements.txt

Note: During the lesson, there are instructions to pip install different libraries. If you follow this setup, you will already have the libraries installed, but still run the commands to become familiar with using them

DevNet Sandbox

This lesson leverages the IOS XE Programmability Sandbox.

You will need to reserve an instance of the sandbox, and establish a VPN connection to your individual Sandbox to complete this lab.

About

Code Repo for Coding 2002 GSX FY19


Languages

Language:Python 90.4%Language:C 6.6%Language:XSLT 1.8%Language:C++ 0.7%Language:Objective-C 0.3%Language:CSS 0.1%Language:JavaScript 0.1%Language:Shell 0.0%Language:HTML 0.0%