Personal notes on brewing python from scratch

Home

These instructions will get you a copy of the Python code for a Python script to gather information of of the network devices a DNAC controller knows about and their attributes.

This is truly from scratch assuming a virgin Macbook pro

1 Install git

These are steps I did back in March 2019 git installation - https://git-scm.com/download/mac

2 Install homebrew

2.1 homebrew installation:

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

2.2 Python 3.6.4 installation - https://www.python.org/downloads/release/python-364/

  • note that virtual environments is the way to go, so first read up on that in my python document

2.3 Python pip installation

curl -o get-pip.py https://bootstrap.pypa.io/get-pip.py sudo python get-pip.py

2.4 Command Line Developer Tools Installation.

After running command this command, complete installation using the GUI.

xcode-select --install

3 Code examples for DNAC (from DevNet)

All of the code and examples for the leason here: DevNet "https://developer.cisco.com/codeexchange/github/repo/bigevilbeard/dnac-device-info" is located in the 'add me here' directory. Clone and access it with the following commands:

git clone https://github.com/bigevilbeard/dnac-device-info cd dnac-device-info

Use pip to install the necessary requirements

pip install -r requirements.txt

3.1 Home