Skip to main content

CrowdStrike AIDR Python SDK

Python SDK for CrowdStrike AIDR.

Installation

pip install crowdstrike-aidr

Requirements

Python v3.12 or greater.

Usage

from crowdstrike_aidr import AIGuard

client = AIGuard(
  base_url_template="https://api.crowdstrike.com/aidr/{SERVICE_NAME}",
  token="my API token"
)

response = client.guard_chat_completions(
    guard_input={
        "messages": [
            {"role": "user", "content": "Hello, world!"}
        ]
    }
)

Timeouts

The SDK uses httpx.Timeout for timeout configuration. By default, requests have a timeout of 60 seconds with a 5 second connection timeout.

You can configure timeouts in two ways:

Client-level timeout

Set a default timeout for all requests made by the client:

import httpx
from crowdstrike_aidr import AIGuard

# Using a float (total timeout in seconds).
client = AIGuard(
    base_url_template="https://api.crowdstrike.com/aidr/{SERVICE_NAME}",
    token="my API token",
    timeout=30.0,
)

# Using httpx.Timeout for more granular control.
client = AIGuard(
    base_url_template="https://api.crowdstrike.com/aidr/{SERVICE_NAME}",
    token="my API token",
    timeout=httpx.Timeout(timeout=60.0, connect=10.0),
)

Request-level timeout

Override the timeout for a specific request:

# Using a float (total timeout in seconds).
response = client.guard_chat_completions(
    guard_input={"messages": [...]},
    timeout=120.0
)

# Using httpx.Timeout for more granular control.
response = client.guard_chat_completions(
    guard_input={"messages": [...]},
    timeout=httpx.Timeout(timeout=120.0, connect=15.0)
)

Retries

The SDK automatically retries failed requests with exponential backoff. By default, the client will retry up to 2 times. Set max_retries during client creation to change this.

from crowdstrike_aidr import AIGuard

client = AIGuard(
    base_url_template="https://api.crowdstrike.com/aidr/{SERVICE_NAME}",
    max_retries=5  # Retry up to 5 times.
)

Metadata

Release files for crowdstrike-aidr 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crowdstrike-aidr 0.8.0
File Size Uploaded Provenance
crowdstrike_aidr-0.8.0.tar.gz 21.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for crowdstrike-aidr 0.8.0
File Interpreter ABI Platform
crowdstrike_aidr-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 46.7 kB

Release files / crowdstrike_aidr-0.8.0.tar.gz

Download URL crowdstrike_aidr-0.8.0.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ce45be825861248c6a57cf2987d8a27476482aef91fd5346557b787ceea606ae
BLAKE2b-256 checksum
How to use checksums
21d34b8b94fd6c4f1d6399063cf824e4f4282100560191bcd64d4f2d1aa83e2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release files / crowdstrike_aidr-0.8.0-py3-none-any.whl

Download URL crowdstrike_aidr-0.8.0-py3-none-any.whl
Size 25.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
adf42f24215eb7dcf8ec24c5fb3a1b35530ad26f2f16605adaf4dd628ecc4c6c
BLAKE2b-256 checksum
How to use checksums
5085c3da2b93f91afe74c81e9e11ef7ec952370bf1c8b76a6cf70ab4886f579d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Security for crowdstrike-aidr 0.8.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for crowdstrike_aidr-0.8.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page