Python SDK for Palo Alto Networks Strata Cloud Manager. Provides OAuth2-authenticated CRUD operations on firewall configuration objects — addresses, security rules, NAT rules, and 80+ resource types — via a unified client interface.
pip install pan-scm-sdkRequires Python 3.10+.
from scm.client import Scm
# Initialize with OAuth2 credentials
client = Scm(
client_id="your_client_id",
client_secret="your_client_secret",
tsg_id="your_tsg_id",
)
# Create an address object
client.address.create({
"name": "web-server",
"ip_netmask": "10.0.1.100/32",
"description": "Production web server",
"folder": "Texas",
})
# List all addresses in a folder
addresses = client.address.list(folder="Texas")
for addr in addresses:
print(f"{addr.name}: {addr.ip_netmask or addr.fqdn}")For comprehensive guides, API reference, and examples for all 80+ supported resources, visit the full documentation site:
https://cdot65.github.io/pan-scm-sdk/
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Run quality checks (
make quality) and tests (make test) - Open a Pull Request
Apache 2.0 — see LICENSE for details.