Skip to main content

Python

The Python client uses HTTP/JSON against the clone API. This is not CrowdStrike production. Base URL on Compose is http://crowdstrike-api.localhost:8088.

The product sample is Hosts query_devices (GET /devices/queries/devices/v1). hello is a sample health call, not a Falcon collection.

import os
from platform_sdk import PlatformClient

c = PlatformClient(
base_url="http://crowdstrike-api.localhost:8088",
token=os.environ.get("PLATFORM_TOKEN"),
)
print(c.query_devices())
print(c.query_devices("hostname:'win*'"))

Hello sample​

from platform_sdk import PlatformClient

c = PlatformClient(base_url="http://crowdstrike-api.localhost:8088")
c.healthz()
print(c.hello())

Install​

python3 -m venv .venv
source .venv/bin/activate
pip install -e ./sdk/python

Use a virtualenv so the package stays in the project.