Prisma Cloud API SDK for Python
Project description
Python SDK for the Prisma Cloud APIs
This project includes a Python SDK for the Prisma Cloud APIs (CSPM, CWPP, and PCCS) in the form of a Python package. It also includes reference scripts that utilize the SDK.
Major changes with Version 5.0:
- Command-line argument and configuration file changes.
Table of Contents
Setup
Install the SDK via:
pip3 install prismacloud-api
Reference Scripts
Please refer to the example/reference scripts directory for documentation and usage details.
If you prefer to use the SDK without using command line options, consider this minimal example:
import os
from prismacloud.api import pc_api
sass_settings = {
"url": "api.prismacloud.io",
"identity": "accesskey",
"secret": "secretkey"
}
on_premise_settings = {
"url": "console.example.com",
"identity": "username",
"secret": "password"
}
env_settings = {
"url": os.environ.get('PC_URL'),
"identity": os.environ.get('PC_IDENTITY'),
"secret": os.environ.get('PC_SECRET')
}
pc_api.configure(sass_settings)
if pc_api.api:
print()
print('Prisma Cloud API Test:')
print()
print(pc_api.current_user())
if pc_api.api_compute:
print()
print('Prisma Cloud Compute API Test:')
print()
print(pc_api.statuses_intelligence())
print()
Support
This project has been developed by Prisma Cloud SEs, it is not Supported by Palo Alto Networks. Nevertheless, the maintainers will make a best-effort to address issues, and (of course) contributors are encouraged to submit issues and pull requests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for prismacloud_api-5.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bd245828cb177c2dfdccf34985a4a7bd7c26de9eded90b0f491af9301a63002 |
|
MD5 | 0294a4527c802e0caaaf8b01113a3b1f |
|
BLAKE2b-256 | 150eeb76ef631eca14694b14b24f711d550968f26bd476d255e7e319868d43c9 |