Skip to main content

Python SDK for Palo Alto Networks Prisma Access Insights 3.0 API

Project description

Prisma Access Insights SDK

Python SDK and CLI for querying the Palo Alto Networks Prisma Access Insights 3.0 API.

Query users, applications, sites, and security events from your Prisma Access deployment for reporting, monitoring, and analytics.

Installation

pip

pip install pan-insights-sdk

Docker

docker build -t insights .
docker run --rm insights --help

From source

git clone https://github.com/ancoleman/insights-sdk-cli.git
cd insights-sdk-cli
make dev

See Installation Guide for all options and CI/CD setup.

Quick Start

1. Set Credentials

export SCM_CLIENT_ID=your-service-account@tsg.iam.panserviceaccount.com
export SCM_CLIENT_SECRET=your-secret
export SCM_TSG_ID=your-tsg-id

2. CLI Usage

insights test                    # Test connection
insights users list agent        # List users (last 24h)
insights users count agent       # Connected user count
insights apps list               # List applications
insights sites traffic           # Site traffic
insights --help                  # All commands

3. Python SDK

from insights_sdk import InsightsClient

with InsightsClient(
    client_id="your-client-id",
    client_secret="your-secret",
    tsg_id="your-tsg-id",
) as client:
    users = client.get_agent_users(hours=24)
    print(f"Found {len(users.get('data', []))} users")

Documentation

Guide Description
Installation pip, Docker, source, and CI/CD setup
CLI Reference Complete command reference
SDK Guide Python SDK usage and filtering

Command Groups

Group Description
insights users User queries (list, count, sessions, devices)
insights apps Application queries
insights sites Site queries
insights security PAB security events
insights monitoring Monitored user metrics
insights accelerated Accelerated app metrics

Development

make help       # Show all targets
make dev        # Install with dev deps
make test       # Run tests
make lint       # Run linters
make format     # Format code
make build      # Build Docker image

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pan_insights_sdk-0.2.3.tar.gz (39.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pan_insights_sdk-0.2.3-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file pan_insights_sdk-0.2.3.tar.gz.

File metadata

  • Download URL: pan_insights_sdk-0.2.3.tar.gz
  • Upload date:
  • Size: 39.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pan_insights_sdk-0.2.3.tar.gz
Algorithm Hash digest
SHA256 1450d8db2e2f49c2c0dba1358acc39cd59e245f05f8c0de9d0e8232cc3e1dfcb
MD5 0749da3e495dfc5c8c4d391af64b89f7
BLAKE2b-256 aa0c04167aaa19aa8364a84374f13561637e0e3faee09865d827e28c0dd943a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pan_insights_sdk-0.2.3.tar.gz:

Publisher: publish.yml on ancoleman/insights-sdk-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pan_insights_sdk-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pan_insights_sdk-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f5b55ffbcbf9ce16711a987f4e80f9ac28999fa9ff031f4a3dfbc078a5d298c4
MD5 e55eb5eb6de3bbfa5612ae50fa87395a
BLAKE2b-256 2cea084c0aed5eb26f21edec281663bab0a15290bed80eb244d616059bd193c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pan_insights_sdk-0.2.3-py3-none-any.whl:

Publisher: publish.yml on ancoleman/insights-sdk-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page