Registry / http-networking / demisto-py

demisto-py

JSON →
library3.3.1pypypi✓ verified 85d ago

A Python library for interacting with the Palo Alto Networks Cortex XSOAR (formerly Demisto) API. Version 3.2.22 supports Python 3.9–3.13. The library provides methods for incidents, indicators, integrations, jobs, and generic API requests. Maintained by Palo Alto Networks; releases follow roughly monthly cadence.

pip install demisto-py
INSTALL
IMPORT
SIG · DEMISTO-PY
D
demisto-py
http-networkingpythonv3.3.1
Install
3.0s avg
Import
Disk
29MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.3.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 27.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.0s · import 0.000s · 28MB
29MB installed
● package 29MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ApiClient
from demisto_client import ApiClient
from demisto_sdk.demisto_client import DemistoClient
Configuration
from demisto_client import Configuration
from demisto_sdk.demisto_client import DemistoClient
demisto_api
from demisto_client import demisto_api
from demisto_sdk.demisto_client import DemistoClient

Initialize client and fetch a list of incidents.

from demisto_sdk.demisto_client import DemistoClient client = DemistoClient( base_url=os.environ.get('DEMISTO_BASE_URL', 'https://my-dhost.example.com'), api_key=os.environ.get('DEMISTO_API_KEY', ''), verify_ssl=True ) client.check_health() # List all incidents incidents = client.search_incidents() print(incidents[:2])
Debug
Known issues
breakingIn v3.0+, `DemistoClient(api_key)` replaced older authentication via username/password. You must now provide an API key, not a password.
fix
Generate an API key from Settings > API Keys in XSOAR and pass as `api_key`.
affects: >=3.0.0
gotchaThe correct import path requires a sub-package: `from demisto_sdk.demisto_client import DemistoClient`. `pip show demisto-py` shows the package name but not the import path.
fix
Use `from demisto_sdk.demisto_client import DemistoClient`.
affects: all
deprecatedIn v3.2.21+ `pkg_resources` is deprecated; the library now uses importlib.metadata internally. If you see warnings about `pkg_resources`, update to latest version.
fix
Upgrade demisto-py to >=3.2.21.
affects: >=3.2.21
Upgrade
Version history
3.3.1latest on PyPI · released May 11, 2026
Audit
Dependencies
requestsrequiredHTTP client for API calls
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
demisto-py — pip install demisto-py · libregistry