.. _examples:

Examples
========

Set up your python environment
------------------------------

1. Install pan-python
2. Clone or install pandevice
3. Run a script

For example::

    pip install pan-python
    git clone https://github.com/PaloAltoNetworks/pandevice
    cd pandevice/examples
    python example.py -h

Replace ``example.py`` with the name of the script to run.

Example scripts
---------------

.. automodule:: examples.upgrade

`View the code <https://github.com/PaloAltoNetworks/pandevice/blob/master/examples/upgrade.py>`_

.. automodule:: examples.userid

`View the code <https://github.com/PaloAltoNetworks/pandevice/blob/master/examples/userid.py>`_

.. automodule:: examples.dyn_address_group

`View the code <https://github.com/PaloAltoNetworks/pandevice/blob/master/examples/dyn_address_group.py>`_
