Introducing pan-python

pan-python is a multi-tool set for Palo Alto Networks PAN-OS, Panorama, WildFire and AutoFocus.

The panxapi.py command line program from pan-python will be used in the PAN-OS XML API labs to perform API requests.

pan-python is available on GitHub at https://github.com/kevinsteves/pan-python, as a package on PyPi (Python Package Index), or can be installed using pip on Python 2.7 or 3.x. pan-python has no dependencies.

Documentation is available on GitHub and as HTML from the package doc/ directory.

Example: Install pan-python Using pip

$ pip install --user pan-python
Collecting pan-python
  Downloading pan-python-0.11.0.tar.gz (109kB)
    100% |                                | 112kB 2.0MB/s
Building wheels for collected packages: pan-python
  Running setup.py bdist_wheel for pan-python ... done
  Stored in directory: /home/ubuntu/.cache/pip/wheels/f4/4c/3e/f8d30075fc8084fd786f23f7751e98a9802759539d500b24de
Successfully built pan-python
Installing collected packages: pan-python
Successfully installed pan-python-0.11.0

$ panxapi.py --version
pan-python 0.11.0

Note

By default pip installs the latest version of the package.

Lab 1

  1. Install pan-python using pip and display its version.
  2. Run panxapi.py with –help to display command line options.
  3. View panxapi.py documentation on GitHub.