Python2 and Python3 SDK for the Prisma SASE AppFabric
Intended to be a small, lightweight SDK wrapper around the Prisma SASE API for easy use. Initial version requires knowledge of JSON/Dict objects for POST/PUT/PATCH operations.
- Active Prisma SASE Account
- Python >= 2.7 or >=3.6
- Python modules:
- Requests + Security Extras >= 2.22.0 - http://docs.python-requests.org/en/master/
- Websockets (if Python >= 3.6) >= 8.1 - https://websockets.readthedocs.io/en/stable/index.html
Comes with example.py
that shows usage to get a JSON list of sites.
Super-simplified example code (rewrite of example.py in ~4 lines of code):
# Import the Prisma SASE SDK API constructor and JSON response pretty printer
from prisma_sase import API, jd
# Instantiate the Prisma SASEx API constructor
sdk = API()
# Call Prisma SASE API login using the Interactive helpers (Handle SAML2.0 login and MSP functions too!).
sdk.interactive.login_secret(client_id='[email protected]',
client_secret='xxxxxx',
tsg_id=1111111111)
# Print a dump of the list of sites for your selected account
jd(sdk.get.sites())
MIT
Version | Build | Changes |
---|---|---|
6.0.1 | b1 | Support for May 2022 Controller release. |
- Get help and additional Prisma SASE Documentation at https://pan.dev/sase/docs
- View the autogenerated documentation in the
docs/
directory, or at https://github.com/PaloAltoNetworks/prisma-sase-sdk-python/. - View in-python help using
help()
functions. (example:help(sdk.get.login)
)