Python3 SDK for the Prisma SASE AppFabric
Maintained. Last release 11 days ago, commits in 2 of the last 26 weeks. Weaker on commit activity and contributor spread.
$
pip install prisma-sasePalo Alto Networks Prisma SASE Python SDK v7.0.1b1
Python3 SDK for the Prisma SASE AppFabric
Synopsis
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.
Requirements
- Active Prisma SASE Account
- Python >= 3.7
- Python modules:
- Requests - http://docs.python-requests.org/en/master/
- Websockets >= 8.1 - https://websockets.readthedocs.io/en/stable/index.html
- urllib3 >= 2.0.0 - https://urllib3.readthedocs.io/en/stable/
Code Example
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='api_user1@1111111111.iam.panserviceaccount.com',
client_secret='xxxxxx',
tsg_id=1111111111)
# Print a dump of the list of sites for your selected account
jd(sdk.get.sites())
License
MIT