Skip to main content

CrowdStrike Falcon Twitter URL

Caracara

PyPI OSS Lifecycle

A friendly wrapper to help you interact with the CrowdStrike Falcon API. Less code, less fuss, better performance, and full interoperability with FalconPy.

Features

A few of the developer experience enhancements provided by the Caracara toolkit include:

Feature Details
Automatic pagination with concurrency Caracara will handle all request pagination for you, so you do not have to think about things like batch sizes, batch tokens or parallelisation. Caracara will also multithread batch data retrieval requests where possible, dramatically reducing data retrieval times for large datasets such as host lists.
Friendly to your IDE (and you!) Caracara is written with full support for IDE autocomplete in mind. We have tested autocomplete in Visual Studio Code and PyCharm, and will accept issues and patches for more IDE support where needed. Furthermore, all code, where possible, is written with type hints so you can be confident in parameters and return values.
Logging Caracara is built with the in-box logging library provided with Python 3. Simply set up your logging handlers in your main code file, and Caracara will forward over debug, info and error logs as they are produced. Note that the debug logs are very verbose, and we recommend writing these outputs to a file as opposed to the console when retrieving large amounts of lightly filtered data.
Real Time Response (RTR) batch session abstraction Caracara provides a rich interface to RTR session batching, allowing you to connect to as many hosts as possible. Want to download a specific file from every system in your Falcon tenant? Caracara will even extract it from the .7z container for you.
Rich and detailed sample code Every module of Caracara comes bundled with executable, fully configurable code samples that address frequent use cases. All samples are built around a common structure allowing for code reuse and easy reading. Just add your API credentials to config.yml, and all samples will be ready to go.
Simple filter syntax Caracara provides an object-orientated Falcon Query Language (FQL) generator. The FalconFilter object lets you specify filters such as Hostname, OS and Role, automatically converting them to valid FQL. Never write a FQL filter yourself again!
Single authentication point of entry Authenticate once and have access to every module.
100% FalconPy compatibility Caracara is built on FalconPy, and can even be configured with a FalconPy OAuth2 object via the auth_object constructor parameter, allowing you to reuse FalconPy authentication objects across Caracara and FalconPy. Authenticate once with FalconPy, and access every feature of FalconPy and Caracara.

Installation Instructions

Caracara supports all major Python packaging solutions. Instructions for Poetry and Pip are provided below.

Caracara supports Python versions that are still supported by the Python Software Foundation, i.e., Python 3.10 and up.

Installing Caracara from PyPI using Poetry (Recommended!)

Poetry: Installation

poetry add caracara

Poetry: Upgrading

poetry update caracara

Poetry: Removal

poetry remove caracara

Installing Caracara from PyPI using Pip

Pip: Installation

python3 -m pip install caracara

Pip: Upgrading

python3 -m pip install caracara --upgrade

Pip: Removal

python3 -m pip uninstall caracara

Basic Usage Examples

"""List Windows devices.

This example will use the API credentials provided as keywords to list the
IDs and hostnames of all systems within your Falcon tenant that run Windows.
"""

from caracara import Client

client = Client(
    client_id="12345abcde",
    client_secret="67890fghij",
)

filters = client.FalconFilter()
filters.create_new_filter("OS", "Windows")

response_data = client.hosts.describe_devices(filters)
print(f"Found {len(response_data)} devices running Windows")

for device_id, device_data in response_data.items():
    hostname = device_data.get("hostname", "Unknown Hostname")
    print(f"{device_id} - {hostname}")

You can also leverage the built in context manager and environment variables.

"""List stale sensors.

This example will use the API credentials set in the environment to list the
hostnames and IDs of all systems within your Falcon tenant that have not checked
into your CrowdStrike tenant within the past 7 days.

This is determined based on the filter LastSeen less than or equal (LTE) to 7 days ago (-7d).
"""

from caracara import Client


with Client(client_id="${CLIENT_ID_ENV_VARIABLE}", client_secret="${CLIENT_SECRET_ENV_VARIABLE}") as client:
    filters = client.FalconFilter()
    filters.create_new_filter("LastSeen", "-7d", "LTE")
    response_data = client.hosts.describe_devices(filters)

print(f"Found {len(response_data)} stale devices")

for device_id, device_data in response_data.items():
    hostname = device_data.get("hostname", "Unknown Hostname")
    print(f"{device_id} - {hostname}")

Examples Collection

Each API wrapper is provided alongside example code. Cloning or downloading/extracting this repository allows you to execute examples directly.

Using the examples collection requires that you install our Python packaging tool of choice, Poetry. Please refer to the Poetry project's installation guide if you do not yet have Poetry installed.

Once Poetry is installed, make sure you run poetry install within the root repository folder to set up the Python virtual environment.

To configure the examples, first copy examples/config.example.yml to examples/config.yml. Then, add your API credentials and example-specific settings to examples/config.yml. Once you have set up profiles for each Falcon tenant you want to test with, execute examples using one of the two options below.

Executing the Examples

There are two ways to use Poetry to execute the examples.

Executing from a Poetry Shell

The poetry shell command will enter you into the virtual environment. All future commands will run within the Caracara virtual environment using Python 3, until you run the deactivate command.

poetry shell
examples/get_devices/list_windows_devices.py

Executing without Activating the Virtual Environment

If you do not want to enter the Caracara virtual environment (e.g., because you are using your system's installation of Python for other purposes), you can use the poetry run command to temporarily invoke the virtual environment for one-off commands.

poetry run examples/get_devices/list_windows_devices.py

All examples are also configured in the pyproject.toml file as scripts, allowing them to be executed simply.

poetry run stale-sensors

To get a complete list of available examples, execute the command util/list-examples.sh from the root of the repository folder.

Documentation

Coming soon!

Contributing

Interested in taking part in the development of the Caracara project? Start here.

Why Caracara?

Simple! We like birds at CrowdStrike, so what better bird to name a Python project after one that eats just about anything, including snakes :)

Metadata

Release files for caracara 1.0.3

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

Source distribution (sdist)

Source distribution for caracara 1.0.3
File Size Uploaded
caracara-1.0.3.tar.gz 61.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for caracara 1.0.3
File Interpreter ABI Platform
caracara-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 142.2 kB

Release files / caracara-1.0.3.tar.gz

Download URL caracara-1.0.3.tar.gz
Size 61.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bc2b93d24f9b27114d0ad7247c80232839702c77208882421e7c020495de79b9
BLAKE2b-256 checksum
How to use checksums
bca28c2922172ca7a7c06632ad5a4465c7fb2d99d965bc0a4a748bb6ad79b5d2
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 May 4, 2026.

Transparency log

Release files / caracara-1.0.3-py3-none-any.whl

Download URL caracara-1.0.3-py3-none-any.whl
Size 81.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4bf866452a21e36ca0d122f4d7b2333bbd8d86afd899216a589c9b2bb85e1d5d
BLAKE2b-256 checksum
How to use checksums
94e9199e81d8295d32a57ad98b743af182506a8ae7e10ef06ea038da13133546
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 May 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.31

2 release files

0.0.29

2 release files

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