EZPanOS
lightweight PAN-OS utility library focused on practical operational tasks.
Why ezpanos exists
ezpanos is not a replacement for Palo Alto Networks’ official SDKs.
It grew out of working directly with PAN-OS automation and seeing how often engineers still end up dealing with hardcoded XPath, XML-heavy responses, and task-specific parsing logic.
ezpanos exists to make that experience more practical.
The PAN-OS ecosystem exposes strong configuration and object-management primitives, but real-world operational automation require lower-level PanOS command execution and response parsing-- making operations requiring application logic more intuitive to build.
Right now, the CLI and execution interfaces return JSON. Higher-order abstractions on objects introduce maintenance overhead. This is more of an execution and translation layer for higher-order automations and projects.
The goal is to make operational automation easier to read and build.
Installation
pip install ezpanos
Quick Start
from ezpanos import EzPanOS
endpoint = "10.0.0.1"
fw = EzPanOS(endpoint=endpoint, username="admin")
print(fw.execute("show system info"))
For slower systems/commands, raise the default API timeout:
fw = EzPanOS(endpoint=endpoint, username="admin", request_timeout_default=90)
If password is omitted, you are prompted.
Credential precedence is deterministic: explicit username/password arguments are used first, then config profile values, then interactive prompt for missing values.
Config Profiles
You can use a config.json file for endpoint/profile organization and optional usernames/passwords.
Conceptually, an estate is the firewalls you intend to manage. Because the utility works on many PanOS Configuration types: Panorama, Firewall, or Log Collector: each can be assimilated into this framework.
Example config.json:
{
"profiles": {
"estate": {
"username": "svc_firewall",
"endpoints": [
{"endpoint": "firewall-1.inside.example.com"},
{"endpoint": "firewall-2.inside.example.com"}
]
}
}
}
Build an estate object:
from ezpanos.estate import Estate
estate = Estate(
config="config.json",
profile="estate",
)
for device in estate.devices:
print(device.endpoint, device.estate_role)
estate is a concrete ezpanos.Estate instance that directly owns a list of EzPanOS devices.
You can also pass a parsed config dictionary directly:
from ezpanos.estate import Estate
config = {
"profiles": {
"production": {
"username": "svc_firewall",
"endpoints": [
{"endpoint": "firewall-1.inside.example.com"},
{"endpoint": "firewall-2.inside.example.com"}
]
}
}
}
estate = Estate(
config=config,
profile="production",
)
Note that the profile value is configurable if you intend to logically separate the management of different such estates. This is useful for environments with multiple Panorama instances.
If passwords are not present in config, you will be prompted.
To apply a command to a Estate:
from ezpanos.estate import Estate
estate = Estate(
config="config.json",
profile="estate",
)
# Example Software upgrade/installation workflow:
# will make all firewalls request a system update
estate.execute_all("request system software check")
# will download a specific version of PanOS
estate.execute_all("request system software download version <version>")
# will install a specific version of PanOS
estate.execute_all("request system software install version <version>")
# will reboot firewalls
estate.execute_all("request restart system")
Rule Management
from ezpanos import EzPanOS
fw = EzPanOS(endpoint="10.0.0.1", username="admin")
result = fw.create_security_rule(
rule_name="example-rule",
from_zones=["trust"],
to_zones=["untrust"],
sources=["any"],
destinations=["any"],
applications=["web-browsing"],
services=["application-default"],
action="allow",
)
print(result)
Delete rule and commit:
delete_result = fw.delete_security_rule("example-rule", ignore_missing=True)
print(delete_result)
commit_result = fw.commit(wait_for_job=True)
print(commit_result)
Job sensitive commands
Some commands like software download/install as well as standard commit jobs execute beyond the xml command success.
To monitor the job id of an executed command:
response = fw.execute("request sustem software download 11.1.6-h3")
job_id = fw.extract_job_id(response)
# Or likewise:
version = "10.1.1"
response = fw.execute(f"request sustem software download version: {version}")
job_id = fw.extract_job_id(response)
This job can then be monitored with
response = fw.execute(f"show jobs id {job_id}")
Metadata
Release files for ezpanos 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ezpanos-1.0.6.tar.gz | 47.6 kB | Without provenance | Details for ezpanos-1.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ezpanos-1.0.6-py3-none-any.whl | Python 3 | none | any | Details for ezpanos-1.0.6-py3-none-any.whl |
Total release size: 91.5 kB
Release files / ezpanos-1.0.6.tar.gz
| Download URL | ezpanos-1.0.6.tar.gz |
|---|---|
| Size | 47.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9366109e1f53649ccc0c57d35530dbc35269a8cc58905c2ca4b6cbf416913988
|
|
BLAKE2b-256 checksum How to use checksums |
459858de9ea67d064cfe2c0f0ba41be620bc2b84f69c2188f35b7b5b6b2bf0a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / ezpanos-1.0.6-py3-none-any.whl
| Download URL | ezpanos-1.0.6-py3-none-any.whl |
|---|---|
| Size | 44.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
674636131de473e7dafdcfbe1d117f2c243bf150dea8acf24d904f491a319839
|
|
BLAKE2b-256 checksum How to use checksums |
d2562ca3a5ebda1a0ae10c1abe2f78b962f1560e336ab0d9603d1928449c339c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for ezpanos 1.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.